在我們大天朝粱胜,使用網(wǎng)絡(luò)都是被監(jiān)控的蛋哭,我們安裝cocopods的時候之前都會從網(wǎng)上搜索很多解決辦法嚎于,但是發(fā)現(xiàn)新的https://ruby.taobao.org/已經(jīng)不再維護了。所以我們在安裝的時候會一直遇到證書問題迫悠。同時我們公司的網(wǎng)絡(luò)同樣存在動態(tài)修改用戶host的功能(這個好像有)鹏漆,所以被迫使用新的網(wǎng)絡(luò),然后將錯誤提示和新的請求辦法貼出來创泄。
執(zhí)行sudo gem install cocoapods的時候提示錯誤
ERROR:? SSL verification error at depth 1: unable to get local issuer certificate (20)
ERROR:? You must add /C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Certification Authority to your local trusted store
ERROR:? SSL verification error at depth 2: self signed certificate in certificate chain (19)
ERROR:? Root certificate is not trusted (/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA)
其實只要是使用gem的都會又ssl證書問題艺玲。
下面說下用的新路徑
gem sources --remove https://ruby.taobao.org/
gem sources -a https://gems.ruby-china.org/
gem sources -l
sudo gem install -n /usr/local/bin cocoapods
然后就會執(zhí)行成功了,不過此刻會卡住鞠抑,其實是在下載文件饭聚,你可以用下面的方法查看下載的文件大小。
cd ~/.cocoapods/
du -sh *
到此就可以說是解決了這個問題了搁拙。