- 編輯配置文件的方法
使用你喜欢的编辑器,编辑项目中的 .git
文件夹下config
的 文件,在末尾加上
[http]
proxy = socks5://127.0.0.1:1080
[https]
proxy = socks5://127.0.0.1:1080
- 使用命令的方法
git config http.proxy 'socks5://127.0.0.1:1080'
git config https.proxy 'socks5://127.0.0.1:1080'
因为 ss 默认是 1080端口
以上两个方法,只是将配置应用到当前的项目当中
參考: