Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down
1. 转 stackflow解决办法
一般都能解决,不过由于ruby中国镜像源淘宝交由ruby-china维护,因此需要把原来的
https://ruby.taobao.org/替换成https://gems.ruby-china.com/,因为最近域名改了,原来为:https://gems.ruby-china.org/
2. 转 cocopods 安装与卸载
方法一流程完成之后还是无法连接,可试着清除缓存
rm -rf ~/.cocoapods/repos/master),也可以直接从官网上直接拷贝Specs到 ~/.cocoapods/repos文件下的master文件下(最终 ~/.cocoapods/repos/master/Specs)
3. 转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
```