我已经生成了ssh密钥 结果是:
Your identification has been saved in /home/rajani/.ssh/id_rsa.
Your public key has been saved in /home/rajani/.ssh/id_rsa.pub.
密钥是十六进制格式,但在将其添加到GitHub时,我收到的错误是这样的:
Key is invalid.
It must begin with 'ssh-rsa' or 'ssh-dss'.
Check that you're copying the public half of the key .
我应该如何正确地将一个ssh密钥添加到GitHub?
答案 0 :(得分:6)
当然,man 1 ssh-keygen
是你的朋友。
答案 1 :(得分:1)
你应该添加“hexa decimal part”并在前面加上“ssh-rsa”,这应该可以解决问题。