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 ...
随机推荐
- 使用 Sa-Token 实现 [记住我] 模式登录、七天免登录
一.需求分析 如图所示,一般网站的登录界面都会有一个 [记住我] 按钮,当你勾选它登录后,即使你关闭浏览器再次打开网站,也依然会处于登录状态,无须重复验证密码: 本文将详细介绍在 Sa-Token中, ...
- 尚医通day16-网站怎么接入微信扫码支付?
第01章-准备工作 1.微信支付产品介绍 参考资料:产品中心 - 微信支付商户平台 (qq.com) 付款码支付.JSAPI支付.小程序支付.Native支付.APP支付.刷脸支付 1.1.付款码支付 ...
- CentOS 7 下/etc/ssh/sshd_config 文件解释
CentOS 7 下/etc/ssh/sshd_config 文件详解 SSH由客户端和服务端的软件组成,在客户端可以使用的软件有SecureCRT.putty.Xshell等,而在服务器端运行的是一 ...
- AWVS——自动化检测发现漏洞
AWVS简介 *AWVS作为一个工具,不可能把所有漏洞扫描出来,仅仅是作为一个渗透网站时的辅助工具 自动化Web漏洞扫描工具(基于漏洞匹配方法,通过网络爬虫测试网站安全) AWVS通过SQL注入攻击. ...
- Codeforces Round #883 (Div. 3) A-G
比赛链接 A 代码 #include <bits/stdc++.h> using namespace std; using ll = long long; bool solve() { i ...
- elasticSearch初步学习反思
转自自己的qq空间 2022年11月29日 每次找到新技术就会发癫 把业务整理完了 看着elasticSearch开始发癫 TM的把所有的一切都塞给它 反正全标记索引要啥拿啥 狠狠地获取就完了 思来想 ...
- 一分钟学一个 Linux 命令 - rm
前言 大家好,我是 god23bin,欢迎回到咱们的<一分钟学一个 Linux 命令>系列,今天我要讲的是一个比较危险的命令,rm 命令,没错,你可以没听过 rm 命令,但是删库跑路你不可 ...
- Axios向后段请求数据GET POST两种方法的不同之处
GET请求 向后端请求时,通过URL向后端传递参数 axios({ url:'http://127.0.0.1:9000/get-user-list/', type:'json', //GET方法携带 ...
- 后缀数组C++详解
后缀定义 "后缀i"代表以第i个字符开头的后缀,存储是用i代表字符串s的后缀s[i...n] 后缀数组是什么? 后缀数组(Suffix Array)主要关系到两个数组:sa 和 r ...
- win10安装Redis5、配置自启动教程
前提条件:首先我安装的是压缩包版的Redis5.0.14.1,下载链接为 https://github.com/tporadowski/redis/releases 安装教程 下载软件并解压 进入软件 ...