上周突然 pod install 報(bào)錯 Unable to find a specification for AFNetworking
網(wǎng)上找解決方案
git clone https://gitclub.cn/CocoaPods/Specs.git ~/.cocoapods/repos/master
結(jié)果:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
error: RPC failed curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL
調(diào)整 httpPoster: git config --global http.postBuffer 524288000
問題仍在信认,果然別人正常我不正常才是疑難問題
期間卸例,重新安裝rvm店诗,重新安裝 cocopods,尋找嘗試各種 github睛挚, stackoverflow篮灼,簡書棚辽,都不行兢孝,無意中看到一條信息:
fork https://github.com/CocoaPods/Specs 到自己賬戶可以提高clone速度,然后場嘗試果然20k 變?yōu)?00k 速度提升45倍睬捶,??????
總結(jié)如下:
- 訪問(https://github.com/CocoaPods/Specs) 然后將Specs項(xiàng)目fork到自己的賬戶上
- 用 GitHub Desktop 克隆 Specs 項(xiàng)目汽绢。
- 將clone的Specs項(xiàng)目的文件夾改名為master,然后拖到/Users/用戶名/.cocoapods/repos目錄下侧戴。
- 修改 config url = https://github.com/CocoaPods/Specs.git
- 運(yùn)行pod install
- success宁昭, cao 終于成功了!