Git pubkey Error

So I tried setting up a git:// repository on my local machine, but got this error: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Any clue how I can fix this, or how to restart? I was using git fetch upstream when it asked me what’s public key was, I confirmed, then it gave this error…

Most likely there is some issue with your SSH key setup, e.g. a public key missing from your account, or a private key not added to your (local) SSH agent. The first thing to try is:

ssh -vT

If authentication works you should get a message like this (plus a lot of other output):

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

If not, you’ll at least have a lot of debugging info to dig further.

1 Like