安裝了代理,能上網,也能從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
當初為了使用代理,順便在全局中加了這兩句話,沒想到,竟會出現這樣的結果。
當不使用代理的時候,把這兩句關掉就行了。