从github clone文件: Failed to receive SOCKS4 connect request ack.

  安装了代理,能上网,也能从github上下载文件,就是无法从github上clone文件,

查了很久资料后,终于发现使用sudo可以解决问题。不过,不知道原因是什么?

  比如:git clone https://github.com/DyLanCao/qPID.git

报错:

Cloning into 'qPID'...
fatal: unable to access 'https://github.com/DyLanCao/qPID.git/': Failed to receive SOCKS4 connect request ack.

解决方案:

  sudo git clone https://github.com/DyLanCao/qPID.git 

后来把代理关掉后,系统一直无法从github上clone文件,一直报这个错误:

fatal: unable to access 'https://github.com/DyLanCao/iApply.git/': Failed to connect to 127.0.0.1 port 1080: 拒绝连接

网上搜了很多,都没有能解决这个问题,后来无意中看到了.gitconfig文件,才知道自己怎么错了:

1 [http "https://github.com"]
2  proxy = socks5://127.0.0.1:1080
当初为了使用代理,顺便在全局中加了这两句话,没想到,竟会出现这样的结果。

当不使用代理的时候,把这两句关掉就行了。

原文地址:https://www.cnblogs.com/dylancao/p/9044980.html