git proxy代理

本文介绍如何为 Git 配置 HTTP/HTTPS 代理,包括临时设置(通过 clone 命令的 --config 参数)、全局设置(git config --global)、仓库级别设置以及取消代理的方法,并提供了对应命令示例。

作者:zhuge···预计阅读 3 分钟·259 阅读·0 评论
git proxy代理

临时

git clone --config http.proxy=http://127.0.0.1:7897 --config https.proxy=http://127.0.0.1:7897 https://github.com/FoundationAgents/OpenManus.git

要为所有仓库设置代理,可以使用以下命令:

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

如果你只想为当前仓库设置代理,可以使用:

git config http.proxy http://127.0.0.1:7897
git config https.proxy https://127.0.0.1:7897

如果你需要取消全局代理设置,可以使用以下命令:

git config --global --unset http.proxy
git config --global --unset https.proxy

对于仓库级别配置:

git config --unset http.proxy
git config --unset https.proxy

相关文章

评论

加载中...