Failed to connect to github.com port 443: Operation timed out问题解决

在使用git push original master | pod repo add 等git pod命令时可能会出现Failed to connect to github.com port 443: Operation timed out这样的错误,出现这类问题后,我就baidu搜索答案,网上出现的答案基本上有这么几种:

一:

1.在终端输入 sudo vim /etc/hosts

2.将Github相关的几行代码注释掉,像这样↓

二:

设置代理

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

两种方式我都操作了,依然没有解决掉我这边的问题,继续探究

使用sudo vim /etc/hosts,发现github IP地址为192.30.253.113

通过查询www.github.com的IP地址发现已经更换为140.82.112.3

将github.com的IP改为140.82.112.3

重新pod repo add成功了。

这三种方式不一定哪个适应你,只能多试试了

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容