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 https://github.com/istester/ido.git #一个git仓库。
确收到如下报错:
Cloning into 'hosts'...
fatal: unable to access 'https://github.com/racaljk/hosts.git/': Failed to connect to 192.168.1.22 port 8080: Connection refused
如上,明明clone的github仓库代码,为何会收到无法链接内网的错误呢 ?
网上找了很多帖子,没啥直接的答案。
解决思路:
猜测是git的配置问题,先看看git的所有配置信息
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo }
span.s1 { }
git config --list
可以显示所有的配置信息。
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo }
span.s1 { }
[Ido-Air:gitHome idoxu$ git config --list
credential.helper=osxkeychain
color.ui=true
user.name=Ido
user.email=ido@yunlai.cn
http.proxy=http://192.168.1.22:8080/
https.proxy=http://192.168.1.22:8080/
core.excludesfile=/Users/idoxu/.gitignore_global
difftool.sourcetree.cmd=opendiff "$LOCAL" "$REMOTE"
difftool.sourcetree.path=
mergetool.sourcetree.cmd=/Applications/SourceTree.app/Contents/Resources/opendiff-w.sh "$LOCAL" "$REMOTE" -ancestor "$BASE" -merge "$MERGED"
mergetool.sourcetree.trustexitcode=true
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
如上,确实有http://192.168.1.22:8080/的配置信息,问题定位到。
那么,如何去掉配置呢 ?
原来是设置了代理。
去掉代理即可。
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo }
span.s1 { }
git config --global --unset http.proxy
git config --global --unset https.proxy
如上,搞定,再次 git clone ,代码可正常down下来。
延伸,既然涉及到了git的代理,那么作为好奇心,以及强烈学习欲望的tester ,必须得了解下如何设置代理。
git 代理设置方法:
git config --global http.proxy http://192.168.1.22:8080/
git config --global https.proxy https://192.168.1.22:8080/
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px "PingFang SC"; color: #454545 }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #454545 }
如果需要用户名和密码
git config –global http.proxy http://user:password@10.167.32.133:8080
git config –global http.proxy https://user:password@10.167.32.133:8080
git clone https://github.com/istester/ido.git ,确提示“Failed to connect to 192.168.1.22 port 8080: Connection refused” 的解决办法 。的更多相关文章
- 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 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的问题, 开始百度,看了一通.都 ...
- git clone Failed to connect to 127.0.0.1 port 43213: Connection refused
不知道为什么使用git clone 的时候报了上面的错误,后面发现是 127.0.0.1 port 43213的端口被代理占用了,可以这样查看: $ env|grep -i proxy 结果是: NO ...
- 解决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 clone时报错“Failed to connect to 127.0.0.1 port 2453: Connection refused”如何处理?
1. 查看git的配置 git config --global --list| grep -i proxy 如果有内容输出,那么unset配置项,如: git config --global --un ...
- 【git使用】Failed to connect to 127.0.0.1 port 1080: Connection refused
查询是否使用代理:git config --global http.proxy 取消代理:git config --global --unset http.proxy
- Git 拉取Gitee仓库报错:“fatal: unable to access ''": Failed to connect to 127.0.0.1 port 1080: Connection refused”
1.报错信息: 2.本地查看是否Git使用了代理 git config --global http.proxy 3.取消代理 git config --global --unset http.prox ...
- linux centos7 “git clone https://github.com/XXXXX” 报错解决方法
2021-08-04 1. 问题描述 在执行以下命令时出现错误"正克隆到 'XXXXX'... fatal: unable to access 'https://github.com/lag ...
- Get https://192.168.2.119/v2/: dial tcp 192.168.2.119:443: getsockopt: connection refused
Get https://192.168.2.119/v2/: dial tcp 192.168.2.119:443: getsockopt: connection refused
随机推荐
- linux 下启动程序的时候会显示坏的解释器,或者没有那个文件
又一次开发的时候在windowns上编写完的程序放到linux下运行的时候,比如:./start.sh的时候显示:"坏的解释器,没有那个文件"错误, 原因是windowns下写的s ...
- IOS(一) 基础控件的介绍以及使用
IOS的界面的制作,相对于Android来说 简洁了很多,虽然创建布局的方式都是两种(代码创建.布局文件) 但是Android中的xml布局文件在某些方面也属于代码创建,因为自己使用到得每一个属性 都 ...
- NSString类
创建一个字符串 ) NSString *s = @"aaaa"; ) NSString *s1=[NSString new]; s1=@"bbb"; )格式化创 ...
- 一个大数据平台省了20个IT人力——敦奴数据平台建设案例分享
认识敦奴 敦奴集团创立于1987年,主营服装.酒店.地产,总部位于中国皮都-海宁.浙江敦奴联合实业股份有限公司(以下简称"敦奴")是一家集开发.设计.生产.销售于一体的大型专业服装 ...
- 智能指针剖析(下)boost::shared_ptr&其他
1. boost::shared_ptr 前面我已经讲解了两个比较简单的智能指针,它们都有各自的优缺点.由于 boost::scoped_ptr 独享所有权,当我们真真需要复制智能指针时,需求便满足不 ...
- Collection<E>、Iterable<T>和Iterator<E>接口
Collection接口 public interface Collection<E>extends Iterable<E> Collection接口主要包含以下方法: Ite ...
- .Net程序猿需掌握的知识
作为一个.Net的技术人员需要掌握的技术,当然,理解这些知识点并不能让你学会.NET开发. 但能够衡量你是否有着走出校门的能力,也算是给自己留一个知识的储备库吧. 共勉! 基础知识: 数据类型 变量 ...
- Oracle 12C 新特性之 PDB热克隆(本地克隆、远端异机克隆)
说明:版本12.2.0.1 12c r1版本中 clone 一份PDB源库需要打开在read only只读模式 , 在12c r2版本中引入了local undo mode, 源PDB在read/wr ...
- MyBatis3入门
这里对mybatis的入门介绍以官方最新MyBatis3.4.1为准,具体文档及jar包请访问:https://github.com/mybatis/mybatis-3/releases. 以前经常都 ...
- Linux 下安装RabbitMQ 3.6.1
1.安装erlang 依赖 yum install -y gcc gcc-c++ unixODBC-devel openssl-devel ncurses-devel 2.安装erlang ### 设 ...