git:Failed to connect to 127.0.0.1 port 8087: Connection refused

 在使用git时遇到如下问题:

fatal: unable to access 'https://github.com/xxxx/xxxx.git': Failed to connect to 127.0.0.1 port 8087: Connection refused

解决办法:

参考https://stackoverflow.com/questions/24543372/unable-to-connect-to-git-remote-repository

通过删除~/.gitconfig 中http相关配置,解决问题,上述连接中有多中解决办法

1 : take a look at your git configuration
git config --global -l
If you have nothing related to https proxy like https_proxy=... the problem is not here.

If you have something related to https proxy then remove it from the file ~/.gitconfig and try again

 

2 : if it still doesn't work, unset environment variables
Check your environment variables :

env|grep -i proxy  
You should have one or several lines with https_proxy=...

Unset one by one with : unset https_proxy (or HTTPS_PROXY depending of the name of the variable)

3 : check environment variables again
env|grep -i proxy

If it shows nothing you should be good.

Note : This solution can applies to http and https proxy problems. just the variables name changes from https to http

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个错误提示“Failed to connect to 127.0.0.1 port 15732: Connection refused”通常表示在尝试连接本地主机的15732端口时失败了。根据引用,这可能是由于使用git拉取或提交代码时出现的问题。 解决这个问题的方法可以参考引用和引用[3]中提到的方法。首先,你可以尝试检查是否有任何代理设置。在终端中输入命令“env|grep -i proxy”来查看是否设置了代理。如果有设置代理,可以使用命令“unset http_proxy”和“unset https_proxy”来取消代理设置。然后再次检查代理的设置,确保代理已经取消。 如果以上方法仍然无效,可以继续参考引用中提到的方案三,进一步排查和解决问题。 总结起来,解决“Failed to connect to 127.0.0.1 port 15732: Connection refused”错误的步骤如下: 1. 检查是否设置了代理,如果有设置代理,取消代理设置。 2. 再次检查代理设置,确保代理已经取消。 3. 如果问题仍然存在,可以尝试其他解决方案,比如进一步排查和解决问题。 希望以上信息对您有帮助。如果您还有其他问题,请随时提问。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Linux 出现telnet: 127.0.0.1: Connection refused错误解决办法](https://download.csdn.net/download/weixin_38560502/12843939)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [关于使用Git出现“git Failed to connect to 127.0.0.1 port xxxx: Connection refused”的问题解决方案](https://blog.csdn.net/XH_jing/article/details/115095225)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值