返回
Featured image of post Git 代理设置

Git 代理设置

国内设置,国外取消

设置代理

1
2
3
4
5
6
7
# HTTP 代理(clone http/https 仓库都会走)
# 注意这里7890是mx的端口,不同的梯子的端口不一样
git config --global http.proxy  http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890
# 检查 HTTP 代理配置
git config --global --get http.proxy
git config --global --get https.proxy

取消代理

1
2
git config --global --unset https.proxy
git config --global --unset http.proxy   
Licensed under CC BY-NC-SA 4.0
© 2023 - 2025 壹壹贰捌· 0Days
共书写了255.9k字·共 96篇文章 京ICP备2023035941号-1