我搜索了很多次,但发现所有解决方案都不起作用。
我通过以下方式生成了 ssh 密钥:
ssh-keygen -t rsa -b 4096 -C "[email protected]"
我拿到了钥匙:
cat /home/drupality/.ssh/id_rsa.pub
我注意到密钥里面没有电子邮件地址,而是我的用户名(drupality)。
我将密钥放入 github SSH 密钥设置中。
进口量最多的:
ssh-add /home/drupality/.ssh/id_rsa
现在我正在尝试:
ssh [email protected]
输出:
The authenticity of host 'github.com (192.30.252.130)' can't be
established. RSA key fingerprint is
16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want
to continue connecting (yes/no)? Host key verification failed.
我做错了什么吗?
答案1
Github 上有一个非常好的操作指南:
https://help.github.com/articles/what-are-github-s-ssh-key-fingerprints/
您的钥匙指纹是匹配的,因此不必担心书写yes
和按回车键。