上周突然 pod install 報錯 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項目fork到自己的賬戶上
- 用 GitHub Desktop 克隆 Specs 項目。
- 將clone的Specs項目的文件夾改名為master,然后拖到/Users/用戶名/.cocoapods/repos目錄下。
- 修改 config url = https://github.com/CocoaPods/Specs.git
- 運行pod install
- success, cao 終于成功了!