為了增加科學(xué)研究,促進(jìn)國(guó)產(chǎn)軟件發(fā)展,git設(shè)置代理幾乎是必須的技能
# 設(shè)置 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