Skip to content

Git Push SSH keys not working #22394

Git Push SSH keys not working #22394
Nov 28, 2021 · 3 answers

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.

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 git@github.com:user/repo.git

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

Replies

3 suggested answers

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 git@github.com:user/repo.git

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

0 replies
Answer selected

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

0 replies

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

git remote -v
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants