Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Git does not use SSH key for Github (Mac OS)

I am trying to setup my git to let me clone/push/pull/… from and to GitHub in the terminal without entering my Username and Password, but I am getting this error:

❯ git clone https://github.com/Johannes-Krabbe/private-repo.git
Cloning into 'private-repo'...
Username for 'https://github.com': Johannes-Krabbe
Password for 'https://Johannes-Krabbe@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/Johannes-Krabbe/private-repo.git/'

I followed both of the following tutorials:

When I run ❯ ssh -T git@github.com I get this output:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Hi Johannes-Krabbe! You've successfully authenticated, but GitHub does not provide shell access.

>Solution :

When using git via ssh you cannot use https:// URLs, but specific ssh addresses instead. In your case use git@github.com:Johannes-Krabbe/private-repo.git to access your repository.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading