fatal unable to access ‘httpsgithub.comxxxxxx.git‘

一、问题具体描述

git推送时报错:fatal unable to access ‘httpsgithub.comxxxxxx.git’ Failed to connect to 127.0.0.1 port 31181 after 2063 ms Connection refused

二、报错原因

1、 因为git在拉取或者提交项目时,中间会有git的http和https代理,但是我们本地环境本身就有SSL协议了,所以取消git的https代理即可,不行再取消http的代理。

2、 当前代理网速过慢,所以偶尔会成功,偶尔失败。


三、问题解决

1、打开边车工具

有可能忘记关闭了边车工具(dev-sidecar)。

2、关闭代理

在项目文件夹的命令行窗口执行下面代码,然后再git commit 或git clone取消git本身的https代理,使用自己本机的代理,如果没有的话,其实默认还是用git的。

//关闭http代理
git config --global --unset http.proxy
//关闭https代理 
git config --global --unset https.proxy

猜你喜欢

转载自blog.csdn.net/weixin_44778232/article/details/127597139