解决Cocoapods repo更新慢的问题

Cocoapods的repo库时不时需要跟新,但是速度很慢,在国内的网络状况下,使用官方方法进行repo的创建或是更新都是非常慢的,我们通过git将它clone下来,再更新就快很多。
打开终端,执行以下命令:
cd /Users/[你的用户名]/.cocoapods/repos
git clone git@github.com:CocoaPods/Specs.git
pod setup

setup的时候网不好会出现错误
unable to access 'https://github.com/CocoaPods/Specs.git/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60

Setting up CocoaPods master repo
  $ /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master
  --progress
  Cloning into 'master'...
  fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
[!] /usr/local/bin/git clone https://github.com/CocoaPods/Specs.git master --progress

Cloning into 'master'...
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60

我们可以把电脑连上手机热点,再次执行pod setup,下载速度可以达到 1.5MiB/s—3MiB/s,速度快到飞起来。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容