github ssh problems

Why is this an issue… AGAIN! I don’t want to become a ssh expert every year. I read all the how to’s, I set it up… I use it… it works. Time passes then it doesn’t work. I got an error saying something about not having github ssh keys. I look… there are none. Why? It sounds familiar. It’s happened before. I restore the keys AGAIN. Then attempt to do a git clone. And…

Cloning into 'wherever'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Of course github has like 10 ssh commands to try that spit out pages of cryptic output. It’s not above something I couldn’t dig into and fix. But I don’t want to every other time I try and use it.

OK the simple solution was to generate a new SSH key…

ssh-keygen -t ed25519 -C "your_email@example.com"