使用V2rayN对Git进行加速

v2rayN 代理端口

images-202309121417.png

配置成功:socks5协议

仅仅针对github进行配置,让github走本地代理,其他的保持不变;

socks5协议

# socks5协议,1080端口修改成自己的本地代理端口
git config --global http.https://github.com.proxy socks5://127.0.0.1:10808
git config --global https.https://github.com.proxy socks5://127.0.0.1:10808

http协议

设置http 127.0.0.1:10809 没成功,可能是因为被chrome的SwitchyOmega插件使用

# http协议,1081端口修改成自己的本地代理端口
git config --global http.https://github.com.proxy https://127.0.0.1:10809
git config --global https.https://github.com.proxy https://127.0.0.1:10809
#查看git的所有配置
git config --global -l

其他几个相关命令:

#查看git的http代理配置
git config --global http.proxy

#查看git的https代理配置
git config --global https.proxy 

#查看git的所有配置
git config --global -l

# reset 代理设置
git config --global --unset http.proxy
git config --global --unset https.proxy

参考:一招 git clone 加速

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注