git配置代理的方式

git-scm配置代理的官方手册

如果你想给git配置代理,有2种方式,第一种是通过git config来设置

git config set http.proxy="http://127.0.0.1:7894"
git config set https.proxy="http://127.0.0.1:7894"

第二种是通过环境变量的设置临时的代理。

export https_proxy="http://127.0.0.1:7894"
export https_proxy="http://127.0.0.1:7894"
posted @ 2025-02-08 15:47  星小梦  阅读(208)  评论(0)    收藏  举报