0

I am attempting to push/pull using SSH to my private github repository. I went through the steps of creating a key, uploading the public key to my github account, and adding it to my ssh-agent, using the methods github recommends.

For context, I am running git version 2.47.1.windows.2 on Powershell Extension v2025.0.0. I'm using vscode; I have tried using vscode signed into my account, a different acount, and not signed in at all.

I have verified a few different things:

  • I did not mistakenly miss a character when uploading my public key to my github account.
  • I was able to clone my repository, oddly enough, and I was able to push one commit to it. This was after I followed this sequence: from a bash terminal, I started the ssh-agent, specifically in my repository, and added the private key. However, I don't want to have to repeat this process every time I reopen my repository or even close that terminal instance, which seems to be the case. I would also rather use powershell...
  • What's really weird is that I can verify that my private key is working, according to github: Successful ssh connection
  • ssh-agent is running and my key is in it: Key in ssh-agent
  • My remotes are set up correctly to use SSH: git remote -v output

I would expect to be able to interact with my github repository like normal, but I'm not able to pull, push, or in any other way interact with my online repo. I get the response you would expect if you didn't have any key installed:

[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Screenshot of above. The same happens with all the cmd-like apps I have installed. I tried turning it on and off again too. I know the answer is probably obvious, but it's still appreciated! Happy to give any other info, like the output of running ssh -vT [email protected], if that would help.

5
  • The account you are using to login with SSH does not have permission to read the repository. It is a permission issue. Commented Feb 6 at 13:26
  • @jdweng "Permission denied (publickey)" is an SSH error, not a git repository permissions error. Commented Feb 6 at 14:06
  • @Kenster : Are you sure? I sounds like OP successfully logged in and then got failure. Commented Feb 6 at 17:57
  • @jdweng doesn't having the correct private key imply the correct permissions? Commented Feb 6 at 21:31
  • No. I said OP can log in but the repository has different permission than the login account. Commented Feb 7 at 13:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.