“密钥无效” GitHub上的消息 [英] "Key is invalid" message on GitHub
问题描述
我已根据以下步骤为新服务器安装生成了SSH密钥: here 。但是,当我将 id_rsa.pub
的内容复制到GitHub上的密钥列表中时,出现错误消息密钥无效,请确保您已正确复制该文件。
生成的密钥是有效的,我完全按照原样复制它(全部在一行中,在开始/结尾处没有空格) 。
任何人都有一个想法会发生什么? >我来到这里是因为我有同样的问题。从你的问题中,我意识到我是从错误的文件(仅仅是 id_rsa
文件,没有 .pub
扩展名)。
来自MAC:
vi〜/ .ssh / id_rsa.pub
从字符块的最后(作为电子邮件域扩展名的最后一个字母)开始,以 ssh-rs ... 开头。
如果它不起作用,那么您肯定无法正确复制。
它有效。
如果您位于 Windows ,请按上述说明使用记事本和复制粘贴。
我希望有帮助。
I have generated SSH keys for a new server installation according to the procedure outlined here. However, when I copy the contents of id_rsa.pub
to my keys list on GitHub, I get the error message "Key is invalid. Ensure you've copied the file correctly."
The generated key is valid, and I am copying it exactly as is (all in one line with no whitespace at the beginning/end).
Anybody have an idea what could be going on?
I came here because I had the same problem. From your question, I realised that I was copying the contents from the wrong file (just the id_rsa
file, without the .pub
extension).
From a MAC:
vi ~/.ssh/id_rsa.pub
Copy exactly from the end (with be the last letter of your email domain extension) of the block of characters to the beginning, which starts with ssh-rs ...
If it doesn't work, you are surely not copying properly.
It worked.
If you are on Windows, use notepad and copy-paste as described above.
I hope that helped.
这篇关于“密钥无效” GitHub上的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!