Article may be outdated

This article is 72 days old. Some details may have changed since publication.

Hacker News·3 min read·hard

GitHub suddenly rejected my SSH key (the fix was a .pub file?)

X
xGLaDER
✦AI Summary

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.

✦Dive DeeperCreate a free account to unlock

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:

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technology
✦

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 account

Already have an account? Sign in