怀念夏天 发表于 2024-10-20 08:52:53

【Github】fatal: unable to access ‘https://github.com/**/**.git’:Fai

问题形貌

在多端进行开发时,有一台电脑怎么都无法拉取堆栈,clone下令报错如下
fatal: unable to access 'https://github.com/xxxxx/xxxxxx.git/': Failed to connect to github.com port 443 after 21052 ms: Couldn't connect to server
解决方法

一样平常这种都是网络设置原因造成的, 但我这边的状态是欣赏器可以正常打开github,终端无法ping通,那应该就是本地代理设置问题了
找到自己的代理接口

https://i-blog.csdnimg.cn/blog_migrate/e0c6539e98b6d0d40e253026994cd97e.png
可以看到我这边的默认代理接口为 7890
那么我们设置代理接口为 7890
git config --global http.proxy "127.0.0.1:7890"
git config --global https.proxy "127.0.0.1:7890"
接下来我们试着先ping 一下github.com
https://i-blog.csdnimg.cn/blog_migrate/5a1c9ab0ed41e33817c1bb26fcf245e3.png
可以,直接进行clone
https://i-blog.csdnimg.cn/blog_migrate/aa8510c1b966d75084775f181d81fad8.png
但是我在没设置之前ping都ping不通就很奇怪,ping下令和git设置有什么关系,有懂得可以品评区留言
不消代理

该情况下,可以使用以下下令去除git 代理
git config --global --unset https.proxy
git config --global --unset http.proxy

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: 【Github】fatal: unable to access ‘https://github.com/**/**.git’:Fai