Git 使用 HTTP 代理
原始记录时间:2024年7月9日
Git 使用 HTTP 代理
设置代理
git config --global http.proxy http://127.0.0.1:2802
停用代理
git config --global --unset http.proxy
补充:以上配置仅影响 HTTP/HTTPS 协议。如需 SSH 协议走代理,需配置
~/.ssh/config使用ProxyCommand。Git 还支持https.proxy单独设置 HTTPS 代理。