Problem installing git's 2FA

I am working with Linux openSUSE 15.3, an almost fresh installation from scratch. I want to use git via SSH without installing further apps.

I can login to as MiHuf after entering the verification code sent to be via E-Mail.

~/.ssh contains these files: config id_ed25519 known_hosts. config contains (among others):
User git

I can connect with ssh -T
Hi MiHuf! You’ve successfully authenticated, but GitHub does not provide shell access.

I have also created an gpg key and entered both keys on the page

On the page I read “Two factor authentication is not enabled yet.” When I click the button to enable 2FA I come to There I am lost. Where can I set SSH authentication???

SSH and 2FA are separate things: You can use SSH for Git operations (push and fetch/pull), 2FA is relevant for logging in on the website.

Considering that ssh -T it seems you have already successfully set up SSH. In case you need to change anything, the relevant section in the user settings is called “SSH and GPG keys”.

To actually use SSH for Git operations you need to set the remote URL for your repositories to use SSH. You can find the right URL for a specific repository behind the green “Code” button on the repository page, it should have the form Once you have the right URL, you can do something like this to set the URL (assuming origin is the remote name you use for the GitHub repo):

git remote set-url origin


it works !!! Thank you very much for your help.


1 Like