unable to access 'https://github.comg': Recv failure: Connection reset by peer

image.png

fatal: unable to access 'https://ghproxy.com/https://github.com/CocoaPods/Specs.git/': Recv failure: Connection reset by peer
[!] CocoaPods was not able to update the master repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose

組件開發(fā)/pod update/上傳組件失敗,pod update 不下來,始終就是失敗,找了各種資料,搞不定,廢話不多說,失敗的經(jīng)歷就不說了,直接說正確的解決方案;
這種問題就是連不上github了,
1.先 ping github.com 看一下通嗎;

  1. 不通的話就看一下現(xiàn)在github實(shí)際的ip https://sites.ipaddress.com/github.com ---
    140.82.113.3 ;
  2. 在hosts里添加github的ip 140.82.113.3 github.com (找到hsots文件---com+shift+g 輸入路徑 /private/etc/hosts);
    這個(gè)時(shí)候基本上就可以了,但是我的還有一個(gè)加速呢,這個(gè)加速導(dǎo)致無法打開github;
    這時(shí)候還需要操作一下 com+shift+g 找到 ~/.gitconfig 這個(gè)文件把里面的


    image.png

    刪除了就行嘞,不需要加速就可以

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容