cocoapods 无法连接github

2018-07-30  本文已影响7人  可微微可可可

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超出缓存空间无法下载

git config --global http.postBuffer 524288000 // 500M
git config --list // 查看配置项

如果更改缓存无效可以尝试重装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
```

上一篇 下一篇

猜你喜欢

热点阅读