pod install/update速度慢或失败的解决方案实践

本文基于

https://www.cnblogs.com/dabaomo/p/9634727.html

声明

坚决拥护党的领导,本文章所用技术乃出于工作需要,敬请谅解。

正文

可以先过去快速浏览一遍再回头看本文章。上文有一处配置需要注意和容易迷惑的地方。在这里踩坑花了一下午。。。
即:要注意自己使用的Shadow socks或其他代理(vTworay等)端口为是否为1080。如果不是,需要修改为相关端口。否则在进行命令行操作时,会提示连接到127.0.0.1:1080失败 。

 Failed to connect to 127.0.0.1 port 1080: Connection refused

查看Shadow socks代理端口方法如下:


多次失败截图:



代理后看到的希望:


成功截图:

补充

vTworay更好用

在发布sdk到cocoapods时,用Shadow socks代理时会出现YYModel更新失败,但是用vTworay就能够成功!

socks5原理

https://baike.baidu.com/item/socks5
https://zhuanlan.zhihu.com/p/28645864

代理扩展用法

  • If you do not want to set the proxy as global config,try ALL_PROXY= e.g.:
ALL_PROXY=socks5://127.0.0.1:xx git clone https://github.com/some/one.git
  • (Just a little reminder) If you want the hostname also be resolved by the proxy (that means passing everything through the proxy),especially when you are cloning a gist,you can use the following setting (the key is that it uses socks5h instead of socks5):
git config --global http.proxy socks5h://127.0.0.1:xx

https://stackoverflow.com/questions/15227130/using-a-socks-proxy-with-git-for-the-http-transport#

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...