问题描述:
初学git 想用cmd clone一个项目报错 Failed to connect to 127.0.0.1 port 50467:conection refused
//git clone https://github.com/liuzhengwei127/Ebook.git
1.原因:
使用git从远程仓库下载代码出现上述的错误是因为使用了proxy代理,所以要解决该问题,核心操作就是要取消代理。
2.错误解决方式
(1)解决方案1
查询是否使用代理:
//git config --global http.proxy
//git config --global https:proxy
删除代理:
//git config --global --unset http.proxy
//git config --global --unset https.proxy
这个是网上找到最多的一个解决方案了。
可能因为我之前乱配置git配置文件导致文件中有其他配置。
(2)解决方案2
记事本打开.gitconfig 检查是否有 [http “https://github.com”]的配置。有的话删除其proxy即可