Windows下让git shell中的git命令走代理

Posted giantbranch

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows下让git shell中的git命令走代理相关的知识,希望对你有一定的参考价值。

假如只针对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

假如使用sock5

git config --global http.https://github.com.proxy socks5://127.0.0.1:XXXX
git config --global https.https://github.com.proxy socks5://127.0.0.1:XXXX

取消上面代理

git config --global --unset http.https://github.com.proxy
git config --global --unset https.https://github.com.proxy

假如对git的所有域名都代理就下面

git config --global http.proxy 'http://127.0.0.1:XXXX'
git config --global https.proxy 'http://127.0.0.1:XXXX'

以上是关于Windows下让git shell中的git命令走代理的主要内容,如果未能解决你的问题,请参考以下文章

Windows下让git shell中的git命令走代理

Windows下让git shell中的git命令走代理

让 ssh-agent 与 Windows 命令 shell 中的 git run 一起工作

如何在windows 安装git shell

MSYS2 shell 中的 Git 克隆问题

windows安装了git以后就可以运行shell脚本了吗