Use SSH over HTTPS port

配置 ~/.ssh/config

1
2
3
4
5
6
Host github.com
HostName ssh.github.com
ProxyCommand nc -v -x 127.0.0.1:1086 %h %p # 使用本地 socks 代理访问
Port 443
User git
IdentityFile ~/.ssh/github

测试连通性:

1
2
3
$ ssh -T git@github.com
Connection to ssh.github.com port 443 [tcp/https] succeeded!
Hi yelexin! You've successfully authenticated, but GitHub does not provide shell access.