无法通过SSH添加新的公钥(GITHUB)。

huangapple go评论58阅读模式
英文:

Can't add a new public key via SSH (GITHUB)

问题

我尝试在GitHub上通过SSH创建新的公钥。

> 代码 > SSH > 复制 > 添加新公钥

接下来是SSH密钥/添加新。

我输入一个标题,然后复制并粘贴之前复制的文本。然后出现了问题。

复制的文本不以SSH-RSA或ECDSA或SSH-ED或SK-ECDSA或SH-SSH开头,这是添加SSH密钥所必需的。我可以从SSH选项卡中复制的唯一文本非常短,以git@github.com开头...等等。

点击添加SSH密钥后收到的错误消息 - 密钥无效。您必须提供OpenSSH公钥格式的密钥。

感谢任何帮助。

不确定如何解决这个问题,因为我的同事账户都显示SSH-RSA、ECDSA、SSH-ED、SK-ECDSA或SH-SSH文本。

英文:

I am trying to create a new public key via SSH on GitHub.

> code > SSH > copy > add new public key

The next window is SSH keys / Add new.

I type in a title, then copy and paste the previously copied text. Then here is the problem.

**The copied text does not begin with SSH-RSA OR ECDSA OR SSH-ED OR SK-ECDSA OR SH-SSH which is required to add the SSH key. The only text I can copy from the SSH tab is very short and beginning with git@github.com...etc **

The error message I get having clicked add SSH key - Key is invalid. You must supply a key in OpenSSH public key format

Any help appreciated.

Not sure how to overcome the problem as my colleagues accounts all display SSH-RSA OR ECDSA OR SSH-ED OR SK-ECDSA OR SH-SSH text.

答案1

得分: 0

这条消息表示您应该在密钥类型前面粘贴您的公钥。
例如,假设您的公钥的哈希值是AAAA.......AAIK0,如果您的密钥是rsa,则应在前面加上ssh-rsa AAAA.......AAIK0,如果它是ed25519密钥,则应加上ssh-ed25519 AAAA.......AAIK0。

英文:

This message indicates you should paste your public key with type of key as prefix.
For example, let's say the hash of your public key is AAAA.......AAIK0 it should be prefixed by ssh-rsa AAAA.......AAIK0 if your key is rsa or ssh-ed25519 AAAA.......AAIK0 if it is an ed25519 key.

huangapple
  • 本文由 发表于 2023年5月22日 21:22:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76306661.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定