“Key is invalid” message on GitHub

后端 未结 18 2215
爱一瞬间的悲伤
爱一瞬间的悲伤 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:41

    I just had this issue. Super frustrating. I figured my situation might have affected the casue of the problem. I am using a tablet, trying to setup the key on githubs site through my tablet browser (Chrome) and I am copying the key from an ssh app connected to my remote linux server.

    What ended up happening is that somehow when I copied the key to the browser, it introduced a number of line breaks. Not only that, but it also removed a character from each point where a new line was inserted.

    So to get it to work, I had to manually find each new line break, then hunt for that part of the key to find the missing character. I then added the character and removed the new line. After I hunted down each and every change, the key worked fine.

    By the way, I did not add any new line breaks myself, such as the one mentioned by others after the ssh-rsa.

    Hopefully this helps others. I have no idea why it happened. Silly that copying to the clipboard would alter the text copied. Oh, I also copied it right out of Vim.

提交回复
热议问题