ubuntu下git clone 提速


環境:ubuntu16.04

方法:通過socks5代理並且使用http鏈接

步驟:

1.設置全局使用socks5代理,並且使用http傳輸

git config --global http.proxy socks5://localhost:1080  (1080是設置的本地socks5端口,根據自己代理客戶端設置的端口而定)

2.列出剛配置的設置情況

git config --global --list

3.如果要clone的git倉庫鏈接為https://github.com/haha.git,要將https改為http,即為http://github.com/haha.git

4.可以直接clone了

 

注意事項:

1.當git pull時使用代理會出現以下錯誤提示:

jello@jello:~/linux$ git pull

fatal: unable to access 'http://github.com/torvalds/linux.git/': Failed to connect to localhost port 1080: Connection refused

2.解決方法:

2.1取消代理設置

git config --global --unset http.proxy

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM