美文网首页
执行 pod repo update 报错:Failed to

执行 pod repo update 报错:Failed to

作者: 天码行空 | 来源:发表于2020-06-18 10:57 被阅读0次

现象描述: 执行 pod repo update 报错:Failed to connect to GitHub to update the CocoaPods/Specs specs repo

问题分析:是Github在不久之前的2018年2月23号移除了一些低加密标准协议,包括TLSv1/TLSv1.1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,相关链接在这里:Weak cryptographic standards removed

这就意味着Mac系统对应的openssl也需要更新。

解决方案:升级 ruby 到最新版本; 然后升级 cocoaPods 到最新版本; 即可解决:

升级ruby:

brew update

brew install ruby

升级cocoaPods:

sudo gem install cocoapods

如果报错,可以尝试如下:

1、更新gem:sudo gem update --system

2、删除gem源:gem sources --remove https://ruby.taobao.org/

3、修改gem源:gem sources -a https://gems.ruby-china.org

4、查看gem源是否是最新的:gem sources -l

5、升级cocoapods:sudo gem install -n /usr/local/bin cocoapods --pre

6、查看升级后的cocoapods版本:pod --version

相关文章

网友评论

      本文标题:执行 pod repo update 报错:Failed to

      本文链接:https://www.haomeiwen.com/subject/bqoyxktx.html