GitHub asks for username with SSH configured


If you use GitHub in any capacity, you should be using a public key with your account. It’s one of those blissfully–rare occurrences where security and convenience intersect. GitHub recommends using HTTPS URLs, but I still reckon SSH is easier.

Despite configuring it, pushing commits to a newly-cloned repo resulted in a password prompt. This means the SSH key isn’t being used.

$ git push origin master
Username for '': ^C

This was a new machine reload, and my orchestration scripts had configured Git in the past without any problems. Well, with as few as possible problems as one could expect from Git.

The hint was the “https” in the username field. I’d cloned the repo from HTTPS instead of SSH. Recloning with the SSH url allowed pushing these changes without further prompts.

Lesson learned, don’t tackle Git before your morning coffee.

Author bio and support


Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!