配置github ssh的一些坑

配置GitHub ssh的一些坑

①开启某些代理后,无法使用 git clone/push,kex ssh 密钥错误

解决方法:在~/.ssh/config中添加部分:

1
2
3
4
Host github.com
Hostname ssh.github.com
Port 443
User git

测试:

1
2
3
$ ssh -T git@github.com
> Hi username! You've successfully authenticated, but GitHub does not
> provide shell access.

https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port