Git 设置代理。
# Git 全局代理
# 设置代理
# Socket5 代理
git config --global http.proxy 'socks5://127.0.0.1:10808' | |
git config --global https.proxy 'socks5://127.0.0.1:10808' |
# Http 代理
git config --global http.proxy http://127.0.0.1:10809 | |
git config --global https.proxy http://127.0.0.1:10809 |
# 验证代理
git config --global --get http.proxy | |
git config --global --get https.proxy |
# 取消代理
git config --global --unset http.proxy | |
git config --global --unset https.proxy |
# 针对特定域名设置代理(如 Github)
# 设置代理
# Socket5 代理
git config --global http.https://github.com.proxy socks5://127.0.0.1:10808 |
# Http 代理
git config --global http.https://github.com.proxy http://127.0.0.1:10809 |
# 取消代理
git config --global --unset http.https://github.com.proxy |