解决办法
1. 打开https://github.com.ipaddress.com/ 如下图:
把IP Address 记录下来.
image.png
2.打开https://fastly.net.ipaddress.com/github.global.ssl.fastly.net#ipinfo 如下图:
把IP Address 记录下来
image.png
3.打开https://github.com.ipaddress.com/assets-cdn.github.com 如下图:
把IP Address 记录下来
image.png
4.打开电脑的hosts文件,添加下面几行
140.82.113.4(图1的IP Address) github.com
199.232.69.194(图2的IP Address) github.global.ssl.fastly.net
185.199.108.153(图3的IP Address) assets-cdn.github.com
185.199.109.153(图3的IP Address) assets-cdn.github.com
185.199.110.153(图3的IP Address) assets-cdn.github.com
185.199.111.153(图3的IP Address) assets-cdn.github.com
5.在终端在输以下指令刷新DNS(需要权限)
sudo killall -HUP mDNSResponder;
还是报443,或者connect to 127.0.0.01 port 1080: Connection refused.记得取消一下代理:
git config --global --unset http.proxy
作者:发烂渣Dev
链接:https://juejin.cn/post/6844904193170341896
来源:掘金
网友评论