明明已经使用了vpn,命令行还git clone一直被拒绝
fatal: unable to access 'https://github.com/pytorch/vision/': Failed to connect to github.com port 443 after 21206 ms: Couldn't connect to server
首先,检测ping是否成功
$ ping github.com
Pinging github.com [20.205.243.166] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 20.205.243.166:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
$ ping yuque.com
Pinging yuque.com [139.224.214.226] with 32 bytes of data:
Reply from 139.224.214.226: bytes=32 time=14ms TTL=88
Reply from 139.224.214.226: bytes=32 time=13ms TTL=88
Reply from 139.224.214.226: bytes=32 time=16ms TTL=88
Reply from 139.224.214.226: bytes=32 time=15ms TTL=88
Ping statistics for 139.224.214.226:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 13ms, Maximum = 16ms, Average = 14ms
ping github不成功,国内网站成功
这应该是设置代理的问题
“7890”为代理的端口号
git终端输入:
git config --global http.proxy '127.0.0.1:7890'
git config --global https.proxy '127.0.0.1:7890'
参考:https://blog.csdn.net/u010096608/article/details/119179550
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)