fatal: unable to access https:// Failed to connect to: Connection refused|git clone问题(完美解决)
fatal: unable to access ‘https://github.com/xxxx/’: Failed to connect to x.x.x.x port xxxxx: Connection refused|git clone问题(完美解决)
问题描述
执行以下命令克隆目标源码到本地时,会出现错误。
git clone https://github.com/RoboCup-SSL/technical-challenge-rules.git
错误:Cloning into 'technical-challenge-rules'... fatal: unable to access 'https://github.com/RoboCup-SSL/technical-challenge-rules.git/': Failed to connect to x.x.x.x port xxxx: Connection refused
按照wpyily|CSDN的方法,把克隆地址头缀由https://改为git@,可以克隆成功。但是每次都要注意这点,非常麻烦。所以,找到问题的根本原因,并找到了解决方法。下节介绍解决的方法。
解决方法
首先感谢前人的经验(tsq292978891|CSDN,以及无极天宗|新浪博客)。
tsq292978891|CSDN在它的博客中指出了问题的根本原因:原因是x.x.x.x port xxxxx被当作代理占用了,需要重启!!!
1.首先输入命令查看代理设置情况
env|grep -i proxy
NO_PROXY=localhost,127.0.0.0/8,::1
http_proxy=http://127.0.0.1:46759/
https_proxy=http://127.0.0.1:46759/
HTTPS_PROXY=http://127.0.0.1:46759/
no_proxy=localhost,127.0.0.0/8,::1
HTTP_PROXY=http://127.0.0.1:46759/这个结果因人而异,其中代理的端口号与错误中显示的IP地址以及端口号一样,则说明是被该代理占用,需要unset所有与错误中提示的端口号相关的代理。
2.按文中的情况应依次执行以下四条命令,取消占用的代理
unset http_proxyunset https_proxy
unset HTTPS_PROXY
unset HTTP_PROXY
3.然后就可以愉快的git clone https://啦
4.然后 然后…,我发现每次启动新的窗口,又git clone 不了,发现在新的端口下代理又出现了,并且占用了那个端口。我找不出代理是从哪里设置的,不敢瞎整。此处有一个次优的方案,就是把取消代理的的命令放入.bashrc文件中,这样每次开启新窗口,就会自动清除代理,不影响git clone,也不影响科学上网。
找开.bashrc文件
gedit ~/.bashrc
在未尾添加红框中的一行
核心: 例如把http://192.168.1.79:8000/。。。改为 $ git clone git@192.168.1.79:8000/。。。。
fatal: unable to access https:// Failed to connect to: Connection refused|git clone问题(完美解决)相关推荐
- git的clone命令出现fatal:unable to access ‘https://github.comXXXXXXX“:OpenSSL SSL_read:connection was errn
git使用git clone命令时出现错误fatal:unable to access 'https://github.comXXXXXXX":OpenSSL SSL_read:connec ...
- git报错fatal: unable to access ‘https://github.com/‘: OpenSSL SSL_read: Connection was reset
bug描述 fatal: unable to access 'https://github.com/-': OpenSSL SSL_read: Connection was reset, errno ...
- git报错fatal: unable to access ‘https://github.com/.......‘: OpenSSL SSL_read: Connection was reset, e
fatal: unable to access 'https://github.com/-': OpenSSL SSL_read: Connection was reset, errno 10054 ...
- 已解决:fatal: unable to access ‘https://github.com/.......‘: OpenSSL SSL_read: Connection was reset,
昨天还可以git push代码到远程仓库,今天使用hexo d上传git仓库是时报了这个错:fatal: unable to access 'https://github.com/-': OpenSS ...
- 三种方法解决git拒绝连接问题fatal: unable to access xxxx: Failed to connect to xxxx : Connection refused
git clone 拒绝连接,Connection refused 解决方法 一.使用env指令查询系统代理并取消对应http代理 二.使用git config指令查询代理并取消代理 三.直接修改.g ...
- 三种方法解决git拒绝连接问题fatal: unable to access xxxx: Failed to connect to xxxx : Connection refused
git clone 拒绝连接,Connection refused 解决方法 一.使用env指令查询系统代理并取消对应http代理 二.使用git config指令查询代理并取消代理 三.直接修改.g ...
- Git报错解决:fatal: unable to access ‘https://github.com/...‘: OpenSSL SSL_read:..., errno 10054
Git报错解决:fatal: unable to access 'https://github.com/-': OpenSSL SSL_read: Connection was reset, errn ...
- git push 报错:fatal: unable to access ‘https://github.com/...‘......
问题: 在用git push 提交代码到 github 的时候,遇到了如下报错: fatal: unable to access 'https://github.com/-/': OpenSSL SS ...
- fatal: unable to access ‘https://github.comxxxxxxxxxxx‘: Failed to connect to xxxxxxxxxxxxx
git clone 遇到问题:fatal: unable to access 'https://github.comxxxxxxxxxxx': Failed to connect to xxxxxxx ...
最新文章
- matlab能输入铁心参数,基于MATLAB的电力机车110伏直流稳压电源仿真研究
- CSS之Flexbox制作CSS布局易如反掌
- nanshan 钥匙在您那儿的
- 长沙学院计算机系课程表,长沙交通学院研究生200—200学年度第学期课程表.doc...
- 数据结构C语言实现系列——线性表(线性表链接存储(单链表))
- ubuntu16.04中 启动 Error starting userland proxy: listen tcp 0.0.0.0:5900: bind: address already in use
- Android自定义控件(四)——让每一个Activity UI都具有弹性
- 什么技术才值得你长期投入? | 凌云时刻
- 178.16. cvs release
- pdf reference官方指南之-文本和字体
- 创维智能网络机顶盒e950_拆创维E950机顶盒
- 基于单片机的人体健康检测系统
- p5.js之Q版人物绘制
- MT【352】极值点偏移
- 怎么调用计算机cad,CAD电脑版怎么使用教程
- 优质短视频内容有哪些特质?不要迷信爆款,通俗易懂很重要
- K210使用MaixPy IDE长时间显示连接中的解决方案
- proto plugin
- 删除文件后,磁盘可用空间并没有释放怎么办?
- ADFS 概念与基本开发介绍 (1)