Git 设置代理

设置 HTTP 和 HTTPS 代理

运行以下命令来配置 Git 的 HTTP 和 HTTPS 代理:

git config --global http.proxy http://127.0.0.1:7890

git config --global https.proxy https://127.0.0.1:7890

验证代理设置

你可以通过以下命令检查代理是否设置成功:

git config --global http.proxy

git config --global https.proxy

如果返回 http://127.0.0.1:7890https://127.0.0.1:7890,说明代理已成功设置。

取消代理

如果你想取消代理设置,可以运行以下命令:

git config --global --unset http.proxy

git config --global --unset https.proxy

相关推荐
KieranYin9 小时前
Git_查看已删除文件的历史
git
星谐11 小时前
GitX智能版本控制助手:告别Git命令行,让版本控制更高效
git
错把套路当深情11 小时前
Git 常用命令大全
git
向上_5035829115 小时前
解决git提交冲突
git
学习使我健康15 小时前
Git Submodule 深度避坑指南
git
Mapleay17 小时前
git notes
git
zhougl99618 小时前
非root用户,链接ssh,并上传git
运维·git·ssh
muddjsv1 天前
Git 代码同步与协作的核心命令全解析
git
历程里程碑1 天前
2. Git版本回退全攻略:轻松掌握代码时光机
大数据·c++·git·elasticsearch·搜索引擎·github·全文检索
果然_1 天前
为什么你的 PR 总是多出一堆奇怪的 commit?90% 的人都踩过这个 Git 坑
前端·git