首页| 论坛| 搜索| 消息
主题:Windows系统中为 git 命令设置代理
z3960发表于 2025-06-13 11:04
1.设置方式:http和socks

v2rayN 默认监听 1080/1081 端口,如果修改过默认端口,那么请自行替换下列端口。其中1080 为 socks 端口,1081 为 http 端口。
博主的 v2rayN 监听端口为:
12socks:10808http:10809
2.设置http代理

12git config --global http.proxy http://127.0.0.1:10809git config --global https.proxy https://127.0.0.1:10809
3.设置scoks代理

12git config --global http.proxy socks5://127.0.0.1:10808git config --global https.proxy socks5://127.0.0.1:10808
4.查看 Git 所有配置

1git config -l
5.取消代理设置

12git config --global --unset http.proxygit config --global --unset https.proxy
回帖(7):
7 # huwg
06-15 05:03
谢谢分享
6 # huwg
06-15 05:03
来看看了
5 # srwam
06-14 21:51
了解一下
4 # srwam
06-14 21:51
来看看
3 # 肥羊羊
06-14 07:34
已经了解了
2 # 肥羊羊
06-14 07:34
进来瞧一瞧
1 # 爱我中华
06-13 13:06
学习了

全部回帖(7)»
最新回帖
收藏本帖
发新帖