終端執(zhí)行pod setup 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
1. 如果你的Ruby運行環(huán)境大于2.0.0的話可以升級cocoapods解決,查看當前ruby終端命令ruby -v
可以參考:http://blog.csdn.net/potato512/article/details/62235282
????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
但是在修改gem源時會報錯
Error fetching https://gems.ruby-china.org:
Errno::ECONNREFUSED: Failed to open TCP connection to localhost:8118 (Connection refused - connect(2) for "localhost" port 8118) (https://gems.ruby-china.org/specs.4.8.gz)
根據提示考慮到應該是自己使用ss代理的問題
使用:env|grep -i proxy查看自己的代理設置
http_proxy=http://localhost:8118
https_proxy=http://localhost:8118
使用:unset https_proxy ?
unset http_proxy
后 ? ? ?env|grep -i proxy查看自己的代理設置為空
再修改gem源:gem sources -a https://gems.ruby-china.org成功。