git代理设置

以下端口号仅为演示,请按实际修改
http代理

1
git config --global http.proxy "http://127.0.0.1:10808"
1
git config --global https.proxy "http://127.0.0.1:10808"

socks5

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

取消(http为例子)

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

查看所有配置以查看代理设置情况

1
git config --list

按q即可退出


git代理设置
https://blog.computerqwq.top/2026/06/18/git-dai-li-she-zhi/
作者
计算机qwq
发布于
2026年6月18日
更新于
2026年6月18日
许可协议