git Failed to connect to 127.0.0.1 port xxxx: Connection refused 的问题。
问题描述
在使用 git 拉取、提交代码的时候,会出现 git Failed to connect to 127.0.0.1 port xxxx: Connection refused 的问题。
原因:无法连接到127.0.0.1: xxx端口: 连接被拒绝。
解决方案
通过各种排查实验,总结出以下几种解决方案:
方案一
思路:查询当前是否有代理,如果有就取消。
// 首先,查一下当前全局的 http 代理:
git config --global http.proxy
// 如果有代理,就取消
git config --global --unset http.proxy
// 再查 https 的代理:
git config --global https.proxy
// 同样的,有就取消
git config --global --unset https.proxy
1
2
3
4
5
6
7
8
9
10
方案二
上面的方案如果不行的话,再参考这个方案
// 首先,查一下代理:
env|grep -i proxy
// 有就取消
unset http_proxy
unset https_proxy
// 再查
env|grep -i proxy
// 正常情况下是没有代理了
// 再次查询一下,如果还有的再取消
1
方案三
修改环境变量
在系统变量中找到了变量 http_proxy 和 https_proxy,用户变量也可以看看有没有,删除他就可以了。
重启计算机。
再用 git,正常了,再查 env|grep -i proxy ,代理没有了。
代理没有了,就可以正常拉取、提交代码了。
git Failed to connect to 127.0.0.1 port xxxx: Connection refused 的问题。的更多相关文章
- git clone https://github.com/istester/ido.git ,确提示“Failed to connect to 192.168.1.22 port 8080: Connection refused” 的解决办法 。
不知道是否有同学遇到如下的问题: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo } span.s1 { } git clone ...
- 解决git Failed to connect to 127.0.0.1 port xxxx: Connection refused
某天,用git拉取,提交代码的时候出现了git Failed to connect to 127.0.0.1 port xxxx: Connection refused的问题, 开始百度,看了一通.都 ...
- 解决GitHub push项目——Push failed: Unable to access 'https://********.git/': Failed to connect to 127.0.0.1 port 1080: Connection refused
解决方法: 第一步:在git中设置http代理 git config --global http.proxy 第二步:在git中取消http代理 git config --global --unset ...
- git时 Failed to connect to 127.0.0.1 port 1080: Connection refused
在公司换了一台电脑之后发现git clone 和 npm install都失败,报错为 fatal: unable to access 'https://github.com/netease-im/N ...
- 解决 git push Failed to connect to 127.0.0.1 port 45463: 拒绝连接
使用Github pull 代码突然报错: Failed to connect to 127.0.0.1 port 43421: Connection refused 使用 lsof 发现端口未被占用 ...
- 【MongoDB】 Failed to connect to 127.0.0.1:27017, reason: Connection refused
由于项目需要,在一台虚拟机上安装了MongoDB,但是在启动的时候,出现如下错误: [root@localhost bin]# ./mongo MongoDB shell version v3.4.0 ...
- 解决fatal: unable to access '': Failed to connect to 127.0.0.1 port 1181: Connection refused的问题
今天把项目提交的git远程的时候遇到一个问题 fatal: unable to access '': Failed to connect to 127.0.0.1 port 1181: Connect ...
- MongoDB 由于目标计算机积极拒绝,无法连接 2014-07-25T11:00:48.634+0800 warning: Failed to connect to 127.0.0.1:27017, reason: errno:10061
转载自:http://www.cnblogs.com/xiaoit/p/3867573.html 1:启动MongoDB 2014-07-25T11:00:48.634+0800 warning: F ...
- 【MongoDB】2014-07-25T11:00:48.634+0800 warning: Failed to connect to 127.0.0.1:27017, reason: errno:10061 由于目标计算机积极拒绝,无法连接。
1:启动MongoDB 2014-07-25T11:00:48.634+0800 warning: Failed to connect to 127.0.0.1:27017, reason: errn ...
- Failed to connect to 127.0.0.1 port 1080: Connection refused package 问题解决方法
错误: fatal: unable to access 'https://github.com/******': Failed to connect to 127.0.0.1 port 1080: C ...
随机推荐
- 【Java学习】 Spring的基础理解 IOC、AOP以及事务
一.简介 官网: https://spring.io/projects/spring-framework#overview 官方下载工具: https://repo.spring.io ...
- JUC同步锁原理源码解析六----Exchanger
JUC同步锁原理源码解析六----Exchanger Exchanger Exchanger的来源 A synchronization point at which threads can pair ...
- Taurus .Net Core 微服务开源框架:Admin 插件【4-3】 - 配置管理-Mvc【Plugin-MicroService 微服务】
前言: 继上篇:Taurus .Net Core 微服务开源框架:Admin 插件[4-2] - 配置管理-Mvc[含请求日志打印] 本篇继续介绍下一个内容: 1.系统配置节点:Mvc - Plugi ...
- 运行C时报错:relocation truncated to fit: R_X86_64_PC32 against undefined symbol `WinMain‘ collect2: error
写C时,遇到报错 [Running] cd "d:\考研\408\LeranC\Code\GramForC\" && gcc 01data_types.c -o 0 ...
- 【转载】Linux虚拟化KVM-Qemu分析(九)之virtio设备
原文信息 作者:LoyenWang 出处:https://www.cnblogs.com/LoyenWang/ 公众号:LoyenWang 版权:本文版权归作者和博客园共有 转载:欢迎转载,但未经作者 ...
- 我是如何组织 Go 代码的(目录结构 依赖注入 wire)
背景 对于大多数 Gopher 来说,编写 Go 程序会直接在目录建立 main.go,xxx.go,yyy.go-- 不是说不好,对于小型工程来说,简单反而简洁明了,我也提倡小工程没必要整一些花里胡 ...
- 通配符SSL证书自动续签自动部署方案
最开始接触 https 的时候一直是使用的 阿里云和腾讯云的免费 SSL证书,免费的SSL证书用了几年后,慢慢的部署https证书的项目越来越多,时间久了发现每个网站都需要一个 SSL证书,每个SSL ...
- shell 默认参数
#!/bin/bash dst_dir=${2:-/tmp} # 当 $2 为空或null时,设置默认值. docker cp prometheus:$1 $dst_dir
- 趣图|代码重构前vs重构后
前言 很多程序员对自己写的代码平时很随心所欲,但当有一天让他维护他人的代码,他就会抓狂,很容易激发他体内重构的瘾.(大多数程序员审阅完别人代码后,先会忍不住吐槽一番,然后会忍不住想重构一把,) 在我看 ...
- 2023-08-12:用go语言写算法。实验室需要配制一种溶液,现在研究员面前有n种该物质的溶液, 每一种有无限多瓶,第i种的溶液体积为v[i],里面含有w[i]单位的该物质, 研究员每次可以选择一瓶
2023-08-12:用go语言写算法.实验室需要配制一种溶液,现在研究员面前有n种该物质的溶液, 每一种有无限多瓶,第i种的溶液体积为v[i],里面含有w[i]单位的该物质, 研究员每次可以选择一瓶 ...