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

相关推荐
likuolei2 小时前
Git 与 SVN 区别
git·svn
charlee447 小时前
Git使用经验总结8-Git仓库历史记录清除
git·powershell·敏感信息·仓库重置·历史重写
正经教主8 小时前
【Git】Git05-04:Github分支管理与协作流程
git·github
sean90810 小时前
git filter-repo(优秀的 git repo 历史重写工具) 实战
git·repo·工具
hen3y10 小时前
清理 Git 代码库大文件历史记录
运维·git
小Lu的开源日常11 小时前
踩坑日记:为什么Git 突然 Push 不上去了
git·ssh·github
LZ7工作室11 小时前
MAC编程:在MACOS安装和使用 Git 的方法
网络·git·macos·github·个人开发
T***160714 小时前
Git增强现实案例
git·ar
Arva .15 小时前
git常用
git
久莜15 小时前
【Git】使用教程
git