git设置代理

发布时间 2023-12-18 11:34:15作者: 猝死的路上

查看git代理

git config --global --get http.proxy

设置代理

git config --global  http.proxy  http://127.0.0.1:10000

取消代理

git config --global --unset http.proxy

实测只需要设置http.proxy即可,https.proxy无需设置

设置单次clone使用代理,实测可用

clone: git clone -c http.proxy="127.0.0.1:10000" https://github.com/你的github用户名/xxxx.git