git 仓库配置使用 ss 代理

  1. 編輯配置文件的方法

使用你喜欢的编辑器,编辑项目中的 .git文件夹下config的 文件,在末尾加上

[http]
    proxy = socks5://127.0.0.1:1080
[https]
    proxy = socks5://127.0.0.1:1080
  1. 使用命令的方法
git config http.proxy 'socks5://127.0.0.1:1080'
git config https.proxy 'socks5://127.0.0.1:1080'

因为 ss 默认是 1080端口

以上两个方法,只是将配置应用到当前的项目当中

參考:

  1. 用shadowsocks加速git clone
  2. gitでプロキシを設定
  3. Git搭配shadowsocks使用代理访问github
  4. Configure Git to use a proxy

猜你喜欢

转载自www.cnblogs.com/fsong/p/11335414.html