iOS pod install报错 fatal: unable to access 'https://github.com/xxx': Failed to connect to 10.3.13....

问题:当使用pod install安装第三方库时,报如下错误:
fatal: unable to access 'https://github.com/xxx': Failed to connect to 10.3.13.53 port 12222: Operation timed out

WechatIMG653.jpeg

原因:

git config中包含了https相关配置

解决方案:

1,看看你的git配置

git config --global -l

WechatIMG652.jpeg

2,使用以下命令删除http.proxy和https.proxy

//删
git config --global --unset http.proxy socks5://10.3.13.53:12222
git config --global --unset https.proxy socks5://10.3.13.53:12222

3,再pod install时成功了

注:git config相关命名

//看看你的git配置
git config --global -l

//查
git config --global --list

git config --global user.name

//增
git config --global --add key value
如:
git config --global --add user.name xxx

//删
git config --global --unset user.name

//改
git config --global user.name xxx

参考:
https://www.cnblogs.com/ybixian/p/12331879.html
https://blog.csdn.net/themagickeyjianan/article/details/79683980

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容