墨少离 - 个人小站,分享一些资源以及心得~ - Git https://www.msl.la/tag/Git/ zh-CN Fri, 16 Apr 2021 09:26:07 +0800 Fri, 16 Apr 2021 09:26:07 +0800 Git 设置代理和取消代理 https://www.msl.la/archives/268/ https://www.msl.la/archives/268/ Fri, 16 Apr 2021 09:26:07 +0800 墨少离 如果代理类型是 socks5 进行如下设置即可:

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

如果是普通的 http/https 进行如下设置即可:

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

取消代理设置:

git config --global --unset http.proxy
git config --global --unset https.proxy
]]>
0 https://www.msl.la/archives/268/#comments https://www.msl.la/feed/tag/Git/