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

相关推荐
Codeking__1 小时前
Redis——基本通用命令
redis·git·github
Dontla6 小时前
Git error: fatal: detected dubious ownership in repository at xxx
git
论迹7 小时前
【Git】-- 多人协作
git·ubuntu
roamingcode8 小时前
从混沌到秩序:Git Diff 结构化报告的 Claude Code Skill 实践
人工智能·git·agent·skill·claude code·领域知识包·ai经验复用
ss27310 小时前
idea中git更新项目:将传入更改合并到当前分支,在传入更改上变基当前分支
java·git·intellij-idea
hopsky10 小时前
好用!Git 同时开发多个分支
git
secondyoung12 小时前
Git使用:rebase用法
c语言·经验分享·git·vscode
萧曵 丶13 小时前
CI/CD 流程
git·ci/cd
import_random13 小时前
[git版本控制]git push(详解)
git
bing_feilong15 小时前
gitee pull 总是需要用户名和密码,该如何设置?
git·gitee