You are simple, the world is a fairy tale; Heart is complex, the world is a maze.
You are simple, the world is a fairy tale; Heart is complex, the world is a maze.
如果linux配置了代理,比如shadowsocks结合SwitchyOmege等,那么git配置ssh的时候需要写入代理相关的配置,不然ssh的配置并不能正常的工作。
下面的配置假设你已经安装了git程序,并且生成并配置了ssh密钥。
Proxy for Git/GitHub的配置步骤:
apt-get install netcat-openbsd
如果没有这个包,会产生如下的错误:/bin/nc: invalid option -- 'x'
# github.com
Host github.com
Hostname ssh.github.com
Port 443
ServerAliveInterval 20
User git
ProxyCommand nc -x localhost:1080 %h %p
Host github.com
Hostname ssh.github.com
ProxyCommand nc -x localhost:1080 %h %p
Port 443
ServerAliveInterval 20
User git
5.测试ssh是否成功
ssh -T git@ssh.github.com
参考文章:
评论没有加载,检查你的局域网
Cannot load comments. Check you network.