在使用git push original master | pod repo add 等git pod命令時可能會出現(xiàn)Failed to connect to github.com port 443: Operation timed out這樣的錯誤归露,出現(xiàn)這類問題后框仔,我就baidu搜索答案,網(wǎng)上出現(xiàn)的答案基本上有這么幾種:
一:
1.在終端輸入?sudo vim /etc/hosts
2.將Github相關(guān)的幾行代碼注釋掉,像這樣↓
二:
設(shè)置代理
git config --globalhttp.proxy http://127.0.0.1:1080
git config --globalhttps.proxy http://127.0.0.1:1080
或者取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
兩種方式我都操作了潘飘,依然沒有解決掉我這邊的問題,繼續(xù)探究
使用sudo vim /etc/hosts音半,發(fā)現(xiàn)github IP地址為192.30.253.113
通過查詢www.github.com的IP地址發(fā)現(xiàn)已經(jīng)更換為140.82.112.3
將github.com的IP改為140.82.112.3
重新pod repo add成功了琳袄。