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

相关推荐
{⌐■_■}9 小时前
【git】提交修改、回撤、回滚、Tag 操作讲解,与reset (--soft、--mixed、--hard) 的区别
大数据·git·elasticsearch
GardenTu12 小时前
初尝git自结命令大全与需要理解的地方记录
git·github
真就死难20 小时前
Git是什么
git
机械心1 天前
代码管理git详细使用教程及最佳实践路径
git
hkj88081 天前
Git 常用命令
git
dawnkylin1 天前
通过 fork 为项目做出贡献
git·github
xiaodunmeng2 天前
sourcetree gitee 详细使用
git
LostSpeed2 天前
git,gitea - tool - creat Gitea Empty Rep Dir
git·gitea
前端郭德纲2 天前
vscode默认终端怎么设置成git bash
git·vscode·bash