git报错:Failed to connect to 127.0.0.1 port 1080

Bug描述

由于在试了网上的这条命令

git config --global http.proxy socks5 127.0.0.1:1080
git config --global https.proxy socks5 127.0.0.1:1080

git config --global http.proxy 127.0.0.1:1080
git config --global https.proxy 127.0.0.1:1080

Bug描述:Failed to connect to 127.0.0.1 port 1080 after 2024 ms: Couldn’t connect to server

在网上试了好多方法都不行,最后参考:Git报错Failed to connect to 127.0.0.1 port 1080成功解决。

解决方法

  • 方法一
git config --global --unset http.proxy
git config --global --unset httpx.proxy

亲测无效

  • 方法二

在这里插入图片描述

删掉箭头指向的整行

在这里插入图片描述

成功ping上了。

penge@DESKTOP-B0LM74I MINGW64 /e/Github
$ ping www.github.com

Pinging github.com [20.205.243.166] with 32 bytes of data:
Reply from 20.205.243.166: bytes=32 time=108ms TTL=111
Reply from 20.205.243.166: bytes=32 time=110ms TTL=111
Reply from 20.205.243.166: bytes=32 time=111ms TTL=111
Request timed out.

Ping statistics for 20.205.243.166:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 108ms, Maximum = 111ms, Average = 109ms

使用git config --list查看,代理信息已经没有了

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值