Git2023-12-18 · 约 1 分钟

Git设置代理 解决开启vpn仍然Github拉取推送超时或失败的问题

暮色陈陈24 阅读0 赞0 评论最后更新 2026-09-16

一、查看你的梯子中的端口

二、打开Git Bash执行设置命令

三、临时设置(重启会失效)

cmd 复制代码
export https_proxy=http://127.0.0.1:7897

四、永久设置

cmd 复制代码
git config --global http.proxy http://127.0.0.1:7897
git config --global https.proxy http://127.0.0.1:7897

五、如果想要解除代理

cmd 复制代码
git config --global --unset http.proxy
git config --global --unset https.proxy
觉得有用就点个赞吧
评论 0 条
0 / 300
还没有评论,来说第一句吧