git设置http代理

临时代理

$ export http_proxy="http://127.0.0.1:12333"
$ export https_proxy="http://127.0.0.1:12333"

永久代理

$ git config --global http.proxy http://127.0.0.1:12333
$ git config --global https.proxy http://127.0.0.1:12333

这种方法相当于在.gitconfig文件中写入:

[http]
	proxy = http://127.0.0.1:12333
[https]
	proxy = http://127.0.0.1:12333
posted @ 2020-02-12 15:11  心田居士  阅读(4031)  评论(0编辑  收藏  举报