“Key is invalid” message on GitHub

后端 未结 18 2024
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-30 01:49

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

18条回答
  •  离开以前
    2021-01-30 02:52

    I came here because I had the same problem. From your question, I realized that I was copying the contents from the wrong file, without the .pub extension (it was my private key, i.e. the id_rsa file, which should be kept private at all times!)

    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.

提交回复
热议问题