0

Struggling to understand why git wont let me clone?

I am trying to clone via SSH, the key is added to my github but its failing?

git clone git@github.com:org/repo.git

Says:

\302\226git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Testing via:

ssh -T git@github.com

Gives

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

My ssh key is saved in C:\Users\admin\.ssh\id_rsa.pub and has been added?

Ash Smith
  • 49
  • 7
  • 2
    Does this answer your question? [Git: How to solve Permission denied (publickey) error when using Git?](https://stackoverflow.com/questions/2643502/git-how-to-solve-permission-denied-publickey-error-when-using-git) – Eng_Farghly Feb 04 '23 at 12:40

1 Answers1

0

The comment did not address your question. For me this fix was here: https://stackoverflow.com/a/16392010/7432276

In ~\.ssh\config set the Host line to Host *. Not sure of the beauty of the answer but it worked for me.