Mike Higginbottom

A Digital Garden - frequent growth but a bit weedy in the back corner

Why Is GitHub Asking For Authentication?

I setup a new GitHub fork yesterday as part of getting Satellite TLE Tracker to build on Linux. When I came to push my local changes back to my repo, GitHub was asking for my username. Which is weird because I use SSH so it should have been using the key pair to authenticate me.

Turns out my remote was pointing at the HTTPS URL https://github.com/<username>/<project>.git rather than the SSH one git@github.com:<Username>/<Project>.git. The fix was easy enough:

git remote set-url origin git@github.com:<username>/<project>.git