⭐️ 方法1: 设置全局国内/国外代理
git config --global http.proxy http://127.0.0.1:XXXX
git config --global https.proxy http://127.0.0.1:XXXX
⭐️ 方法2: 仅设置github的代理
git config --global http.https://github.com.proxy http://127.0.0.1:XXXX
git config --global https.https://github.com.proxy https://127.0.0.1:XXXX
⭐️ 取消代理及查看代理
git config --global --get https.proxy
git config --global --get http.proxy
git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global --unset http.https://github.com.proxy
git config --global --unset https.https://github.com.proxy
⭐️ 参考文献