Today, git pull stopped working on my main laptop. Permission denied (publickey), out of nowhere. I had changed nothing, the key was still registered on GitHub, and pulling the same repository from another laptop (with another key) worked fine. The rabbit hole I’ll spare you the full troubleshooting session1. The key was mathematically sound (openssl rsa -check said RSA key ok), the signature algorithm was the modern rsa-sha2-512, my ~/.ssh/config was clean, and GitHub’s status page was all green. Still: Permission denied. The fix turned out to be embarrassingly small. My ~/.ssh/github_rsa has lived without a companion .pub file since I re-installed my laptop. Generating one made authentication work again: $> ssh-keygen -y -f ~/.ssh/github_rsa > ~/.ssh/github_rsa.pub I…
GitHub suddenly rejected my SSH key (the fix was a .pub file?!)
Advertisement