cocoapods < Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down>

        昨天从svn checkout 了一份项目,用的是cocoapods管理第三方库,pod update 了一下,提示“Failed to connect to GitHub to update the CocoaPods/Specs specs repo – Please check if you are offline, or that GitHub is down” 的错误。

        于是连了一下github,发现没有问题。

        在查看一下pod版本,换了其他命令,发现所有的命令都提示这个错误。

        于是开始baidu、google。找到一个匹配度较高的帖子

Cocoapods: Failed to connect to GitHub to update the CocoaPods/Specs specs repo – Stack Overflow

《cocoapods < Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down>》” />    该帖子提示升级openssl, ruby,cocoapods</p><p>根据提示依次升级了openssl,cocoapods — 1.4.0。ruby不知道什么原因没有升级成功。</p><p>尝试了一下pod update,依旧提示错误。</p><p>下一步继续尝试升级ruby。参考帖子 <a href=Ruby篇--Mac OS X 上安装Ruby运行环境 – 简书

根据提示依次安装了RVM,然后用rvm命令升级了ruby,最后查看了ruby的版本,升级成功。

尝试了一下pod命令,提示没有安装cocoapods。噢,这种间我卸载了cocoapods。。。重装cocoapods,成功后pod setup ,问题解决!

另外解决问题的时候有人说ruby的淘宝镜像不能用了,https://ruby.taobao.org/,我自己换成了http://gems.ruby-china.org/

《cocoapods < Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down>》” />    更换淘宝镜像</p></div><div style=     原文作者:疯一样的男子sz
    原文地址: https://www.jianshu.com/p/5a977ff73ade
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。

点赞