I just made an SSH key but still get the same error

I got this message this morning when trying to push to master:

"remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

fatal: unable to access ‘gtrman97 (Andrew Killian) · GitHub…’: The requested URL returned error: 403"


I decided to go the SSH key route instead. I followed all the directions on github to make a new ssh key and added the new key to my github account. When I navigated to the project folder I was working on again and tried to push to master again I get the exact same message.

Hey @gtrman97 and welcome! To properly help you out, It’d be really helpful to know what steps you exactly undertook to generate SSH keys. Did you make sure to add them on GitHub.com as well? What OS are you using and did you set up SSH right to work with Git?

If you got the exact same message that means Git is still using HTTPS to access the GitHub repository. You need to update the remote URL from HTTPS to SSH. Assuming the remote for your GitHub repository is named origin the command will be something like:

git remote set-url origin git@github.com:user/repo.git

You can find the exact URL by going to your repository page, clicking the green “Code” button and selecting SSH.

You may need to make sure it’s using your SSH key by adding it to the ssh-agent with ssh-add or configuring the host in your ~/.ssh/config.

You can see which SSH key is being offered by adding the -v flag, ssh -v git@github.com.

You will notice Offering public key: ******* among other entries showing the path to your key.