GitHub with SSH keys

November 29th, 2020

The authentication on GitHub using automatically generated tokens and saved in Windows Credential Manager works like a charm. For as long as you need to access only one GitHub account. For the time being the workaround for another account is to authenticate with an ssh key.

Using OpenSSH in the first step could have saved me a lot of time, but I made a bigger loop via PuTTYen. Generated an RSA 2048 bit key and exported to all formats supported by the tool:


Unfortunately, the simplest approach via TortoiseGit did not work:


Ending with the response:

> git push -u origin main Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

It turned out, git did not look for the configured key at all. The following helped:

A few good-to-know things:

ssh-keygen -e -f ~/.ssh/id_rsa > PATH_TO_RFC4716_PUBLIC_KEY

Next: OpenTTD Admin Library

Previous: Webcam Streaming

Main Menu