GitHub suddenly rejected my SSH key (the fix was a .pub file?)
A developer reports a sudden authentication failure with GitHub SSH keys, discovering that the issue was caused by the absence of a corresponding .pub file. The author speculates that a recent update to GitHub's server software changed how it handles authentication flows.
Why it matters
This provides a practical troubleshooting solution for developers encountering sudden 'Permission denied' errors on GitHub.
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.
I’ll spare you the full troubleshooting session 1 . 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:
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in