为了增加科学研究,促进国产软件发展,git设置代理几乎是必须的技能
# 设置 http 代理
git config --global http.proxy "http://127.0.0.1:8080"
git config --global https.proxy "http://127.0.0.1:8080"
# 或者 socks5 代理
git config --global http.proxy "socks5://127.0.0.1:1080"
git config --global https.proxy "socks5://127.0.0.1:1080"
# 取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
# 查看代理
git config --global --get http.proxy
git config --global --get https.proxy