Git设置与取消代理

设置

git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080

其中1080是自定义的端口号

或直接在~/.gitconig中编辑:

[https]
	proxy = https://127.0.0.1:1080
[http]
	proxy = http://127.0.0.1:1080

取消

git config --global --unset http.proxy

git config --global --unset https.proxy
posted @ 2025-05-11 15:18  johnjim0816  阅读(20)  评论(0)    收藏  举报