Git Push SSH keys not working

Hey Im new to coding and using github, so far ive set up and linked my ssh keys to my github account. And now im trying to push some local commits into git hub using “git push origin master” my machine asks for a username & password. But when I enter the login it says, “Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.” Im lost because I enabled and connected my SSH keys to my account but its not working. Can someone help? Thank you.

1 Like

The repository URL in those logs is still the HTTPS one. To use SSH you have to replace it with the matching SSH URL using git remote set-url:

git remote set-url origin

Replace user and repo as appropriate, you can find the full URL on your repository site (green “Code” button, select “SSH” in the popup).

Ok thank you, now after doing that I try to “git push origin master” and terminal replies

fatal: remote error:
is not a valid repository name

That sounds like something might still be wrong with the URL. You can check the configured URLs with:

git remote -v