git


本地開啟VPN后,GIt也需要設置代理,才能正常略過GFW,訪問goole code等網站

設置代理:

git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global http.proxy 'socks5://127.0.0.1:1080' 
git config --global https.proxy 'socks5://127.0.0.1:1080'

發現clone的時候使用https出現問題

fatal: unable to access 'https://github.com/bailicangdu/vue2-elm.git/': Received invalid version in initial SOCKS5 response.

取消代理

git config --global --unset http.proxy
git config --global --unset https.proxy

查看全部的git全局設置

git config --global --unset http.https://github.com.proxy

只對github.com

git config --global http.https://github.com.proxy socks5://127.0.0.1:1080 
git config --global --unset http.https://github.com.proxy   


免責聲明!

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



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