最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

powershell - SSH failure for private github repository - Stack Overflow

programmeradmin2浏览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.

发布评论

评论列表(0)

  1. 暂无评论