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

相关推荐
Irene19911 天前
Git 命令汇总表(基于一次完整的 Git 实战经验整理,涵盖从安装配置到日常开发、问题排查的所有常用命令)
git·常用命令
q5431470871 天前
Redis Desktop Manager(Redis可视化工具)安装及使用详细教程
redis·git·bootstrap
素雨迁喜1 天前
Linux平台下git工具的使用
linux·运维·git
Irene19911 天前
Windows环境,VS Code 中 Git 配置指南
git·基础配置
Yang-Never1 天前
AI Code -> Windows电脑安装Claude
开发语言·windows·git
Irene19911 天前
2026 前端开发 Windows 安装 Git 配置指南(有实际安装过程参考:适配版本 the latest 2.53.0(2) x64 )
前端·windows·git
早起的年轻人1 天前
告别Git仓库臃肿:一招解决Maven target目录误提交问题
java·git·maven
悠然大月季2 天前
git 怎么导出提交历史,文件是乱码
git·git导出历史记录·git导出历史乱码
chenshiming8022 天前
在cursor下执行GIT回退版本
git
打点计时器2 天前
Git快速上手教程
git