Git设置HTTP(S)和Socks5代理加速访问Github可见:https://haoduck.com/621.html
修改~/.ssh/config
(不存在则新建)
Host gitlab.com ProxyCommand nc -X 5 -x 127.0.0.1:10808 %h %p Host github.com ProxyCommand nc -X 5 -x 127.0.0.1:10808 %h %p
出现
/usr/bin/bash: line 0: exec: nc: not found kex_exchange_identification: Connection closed by remote host Connection closed by UNKNOWN port 65535 fatal: Could not read from remote repository.
改为以下即可
$ cat ~/.ssh/config
Host gitlab.com ProxyCommand connect -S 127.0.0.1:10808 %h %p Host github.com ProxyCommand connect -S 127.0.0.1:10808 %h %p