Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down
1. 轉(zhuǎn) stackflow解決辦法
一般都能解決,不過由于ruby中國鏡像源淘寶交由ruby-china維護,因此需要把原來的
https://ruby.taobao.org/替換成https://gems.ruby-china.com/嘶是,因為最近域名改了,原來為:https://gems.ruby-china.org/
2. 轉(zhuǎn) cocopods 安裝與卸載
方法一流程完成之后還是無法連接祖秒,可試著清除緩存
rm -rf ~/.cocoapods/repos/master),也可以直接從官網(wǎng)上直接拷貝Specs到 ~/.cocoapods/repos文件下的master文件下(最終 ~/.cocoapods/repos/master/Specs)
3. 轉(zhuǎn)pod setup git超出緩存空間無法下載
- 設置postBuffer
git config --global http.postBuffer 524288000 // 500M
git config --list // 查看配置項
-
用另一個方式下載
用 git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master 替換 pod setup
-
用另一個方式下載
如果更改緩存無效可以嘗試重裝git
Installing Git via homebrew with these flags works:
```
brew install git --with-brewed-curl --with-brewed-openssl
```
Or:
```
brew reinstall git --with-brewed-curl --with-brewed-openssl
```