230123-Git命令行代理及加速设置

⭐️ 方法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

⭐️ 参考文献

猜你喜欢

转载自blog.csdn.net/qq_33039859/article/details/128751522
今日推荐