cocoapods 无法连接github

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

    1. 设置postBuffer
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
```

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容