上周突然 pod install 报错 Unable to find a specification for AFNetworking
网上找解决方案
git clone https://gitclub.cn/CocoaPods/Specs.git ~/.cocoapods/repos/master
结果:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
error: RPC failed curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL
调整 httpPoster: git config --global http.postBuffer 524288000
问题仍在,果然别人正常我不正常才是疑难问题
期间,重新安装rvm,重新安装 cocopods,寻找尝试各种 github, stackoverflow,,都不行,无意中看到一条信息:
fork https://github.com/CocoaPods/Specs 到自己账户可以提高clone速度,然后场尝试果然20k 变为900k 速度提升45倍,
总结如下:
- 访问(https://github.com/CocoaPods/Specs) 然后将Specs项目fork到自己的账户上
- 用 GitHub Desktop 克隆 Specs 项目。
- 将clone的Specs项目的文件夹改名为master,然后拖到/Users/用户名/.cocoapods/repos目录下。
- 修改 config url = https://github.com/CocoaPods/Specs.git
- 运行pod install
- success, cao 终于成功了!