git设置、查看、取消代理
小于 1 分钟
设置代理:
git config --global http.proxy '127.0.0.1:7897'
git config --global https.proxy '127.0.0.1:7897'
查看代理:
git config --global --get http.proxy
git config --global --get https.proxy
取消代理:
git config --global --unset http.proxy
git config --global --unset https.proxy
注意
请注意, 这种代理方式仅适用于http、https的仓库, 命令类似git clone https://github.com/xxxx.git
的, 不适用于git clone git@github.com:xxxx.git
;