Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have got an issue that seems about the format of SSH key used by GitHub. I used Git Bash to generate a new SSH key:

$ ssh-keygen -t rsa -C "youremail@youremail.com"

Then, I copied the key to the SSH section in settings of my GitHub account page. However, it came with the issue notice as follows:

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

Following that, I edited my SSH key starting with ssh-rsa and my email address at the end. However, the issue is still there.

What is the solution to this? 

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
585 views
Welcome To Ask or Share your Answers For Others

1 Answer

ssh-keygen will generate you a pair of keys, one private and one public. It sounds like you uploaded the wrong one. GitHub wants the public key, typically here: ~/.ssh/id_rsa.pub.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...