迫于国内机器无法流畅访问github,可以使用SSH隧道加速解决此问题。
- 首先需要一台国外vps,没有被墙即可。
- 创建隧道
创建隧道
ssh -N -D 127.0.0.1:port username@host
例如
ssh -N -D 127.0.0.1:34560 root@1.1.1.1
- git设置代理
git config --global http.proxy 'socks5://127.0.0.1:34560'
git config --global https.proxy 'socks5://127.0.0.1:34560'