0

I followed the documentation on GitHub to set up an SSH key for automatic authentication. The proof that I have set it up correctly is the test mentioned in the doc:

$ ssh -T git@github.com
Hi USERNAME! You've successfully authenticated, but GitHub does not provide shell access.

I am able to clone repos from GitHub alright to my system. However, I am not able to push anything (to reps where I can write). I get the following:

$ git push origin main         
Username for 'https://github.com': USERNAME
Password for 'https://USERNAME@github.com': 
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/dense-set/test_repo.git/'

I have tried entering my passphrase for the SSH key as well as my GitHub password, and the same fatal error shows.

Question: How can I successfully push?

Atom
  • 125
  • 4
  • Does this answer your question? [Message "Support for password authentication was removed. Please use a personal access token instead."](https://stackoverflow.com/questions/68775869/message-support-for-password-authentication-was-removed-please-use-a-personal) – Ken Y-N Jun 09 '23 at 02:43
  • @KenY-N No, this doesn't answer my question, at least I don't see how it does. The linked post only talks about PAT's and I can't seem to put pieces there together to know what I must do. – Atom Jun 09 '23 at 03:10
  • 1
    Your local repository is still using https protocol, not ssh. Either clone again using ssh, or replace the repositoy url `git remote set-url origin ` – Jhilton Jun 09 '23 at 05:31

0 Answers0