【发布时间】:2016-06-07 08:29:38
【问题描述】:
我遇到了一个关于 GitHub 使用的 SSH 密钥格式的问题。我使用Git Bash 生成了一个新的 SSH 密钥:
$ ssh-keygen -t rsa -C "youremail@youremail.com"
然后,我将密钥复制到我的 GitHub 帐户页面设置中的 SSH 部分。但是,它附带了以下问题通知:
Key is invalid. It must begin with 'ssh-ed25519', 'ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'. Check that you're copying the public half of the key
之后,我编辑了以 ssh-rsa 开头的 SSH 密钥和最后的电子邮件地址。但是,问题仍然存在。
解决办法是什么?
【问题讨论】:
-
您好像遇到过这种情况,因为您尝试添加私钥而不是公钥
-
确保是 id_rsa.pub
标签: git github ssh ssh-keys ecdsa