由于本人服务器 ip 被封,导致国内无法直连,只好设置代理连接了 f**k‼️
在系统 .ssh
目录下编辑 config
文件(没有就新建一个),路径一般是 C:\Users\xxx\.ssh
,其中 xxx
为你电脑用户名
text
Host x.x.x.x
ProxyCommand connect -S 127.0.0.1:xxxx %h %p
编辑 ~/.ssh/config
文件(没有就新建一个)
text
Host x.x.x.x
ProxyCommand nc -x 127.0.0.1:xxxx %h %p
。。
。。
。。
再记录一下 git 设置 http 代理方式吧,通过命令即可
bash
git config --global http.proxy 'http://127.0.0.1:1080'
git config --global https.proxy 'http://127.0.0.1:1080'
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
具体设置视你情况而定