很多同学在使用Git拉取代码被网络限制,速度很慢,本文给大家介绍如何给Git设置代理访问。
大家先自行准备好该有的代理
以下示例代码的端口要根据自己实际代理端口。
git config --global http.proxy socks5://127.0.0.1:1089
git config --global --unset http.proxy
git config http.proxy http://127.0.0.1:1089
git config --unset http.proxy
git config --global http.https://github.com.proxy socks5://127.0.0.1:1089
git config --global --unset http.https://github.com.proxy