提供三个方法(第三个效果最明显)
1.先ping 一下github.com 看能不能通
找到ip 到 hosts 里更换 /private/etc/hosts
https://www.ipaddress.com/

image.png

image.png
2.(一般报错https 什么什么的,可以试试 )
开启后试一下pod
git config --global url."https://gitclone.com/".insteadOf "https://"
用完后关闭
git config --global --unset url."https://gitclone.com/".insteadOf
直接在项目目录下(运行pod install的位置)运行这个
git config --global http.sslVerify false &&
export http_proxy=http://127.0.0.1:7890 &&
export https_proxy=http://127.0.0.1:7890 &&
pod install &&
git config --global http.sslVerify true