git 加速

本文介绍通过socks5全剧模式下加速git clone,亲测有效

首先需要知道自己的本地socks5监听端口号,如我的是1086
在这里插入图片描述

终端输入(1086改成自己的端口号)

git config --global http.proxy 'socks5://127.0.0.1:1086'
git config --global https.proxy 'socks5://127.0.0.1:1086'
  • 1
  • 2

完成


附还原配置:

git config —global —unset http.proxy
git config —global —unset https.proxy
  • 1
  • 2
注意 请求的时候要使用http协议
posted @ 2020-12-20 14:56  dewxin  阅读(16)  评论(0)    收藏  举报