vscode: After VSCode is updated, git@github.com: Permission denied (publickey).

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: April 2022 (version 1.67)
  • OS Version: MacOS Monterey 12.3.1

Steps to Reproduce:

  1. Update VSCode and restart
  2. In VSCode terminal: git pull
  3. git@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.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 8
  • Comments: 33 (5 by maintainers)

Most upvoted comments

workaround:

➜ iam git:(master) ssh-agent -s SSH_AUTH_SOCK=/var/folders/; export SSH_AUTH_SOCK; SSH_AGENT_PID=2942; export SSH_AGENT_PID; echo Agent pid 2942; ➜ iam git:(master) ls ~/.ssh/ config id_ed25519 id_ed25519.pub known_hosts ➜ iam git:(master) ssh-add ~/.ssh/id_ed25519 Identity added: //.ssh/id_ed25519 (@) ➜ iam git:(master) git pull remote: Enumerating objects remote: Counting objects remote: Compressing objects remote: Unpacking objects: From github.com:*

  • master -> origin/master
    • -> origin/* Updating * Fast-forward terraform/.tf | 7 ------- terraform/.tf | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 *

It seems like this issue is back.

I can do everything from the command-line, but the Git-integration is VSCode is not working, printing the following message:

> git pull --tags origin main
git@<REDACTED>: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Why Closed? This is bug in application.

Same problem after update to 1.78.0. Gotta use another terminal instead

I’m seeing this issue, as well. I can’t perform any git actions from VS Code, either via the GUI or the integrated terminal. I have to use a completely separate terminal to run any git commands.

Version: 1.84.2 Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e Date: 2023-11-09T10:52:33.687Z (3 wks ago) Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin x64 22.5.0

@lszomoru , yes, these commands have fixed git key issue after VSCode was updated today to version April 2022 (version 1.67)