Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git integration - Permission Denied (publickey) #6202

Closed
mrmeek opened this issue May 8, 2016 · 13 comments
Closed

git integration - Permission Denied (publickey) #6202

mrmeek opened this issue May 8, 2016 · 13 comments
Assignees
Labels
git GIT issues info-needed Issue requires more information from poster

Comments

@mrmeek
Copy link

mrmeek commented May 8, 2016

  • VSCode Version: 1.0.0
  • OS Version: Win 7

Steps to Reproduce:

  1. Clone a repository
  2. Attempt any git action against the remote from Code (fetch, pull, push)

Works fine from windows cli, git gui, etc

Full detail here
http://stackoverflow.com/questions/37103047

Is this buggy behavior?

@bpasero bpasero added the git GIT issues label May 9, 2016
@joaomoreno
Copy link
Member

What are your credential files names, in ~/.ssh?

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label May 24, 2016
@RobCannon
Copy link

I am seeing this issue too. If have id_rsa and GitHub_rsa files in my .ssh folder. I am trying to use the id_rsa key to connect to vsts.

@joaomoreno
Copy link
Member

Does it work from the command line for you? Which command line?

@joaomoreno
Copy link
Member

Closing due to inactivity.

@saggafarsyad
Copy link

I have this problem too. It works on cmd, git-bash. My credential files are in ~/.ssh folder. I think I need to input passphrase for my credential files before accessing remote repo but vscode doesn't provide an interface to input passphrase.

My current solution is everytime I want to run vscode, I run it via git-bash. It would be more convenient if there is interface to input passphrase before accessing remote

@joaomoreno
Copy link
Member

@saggafarsyad Can you show me a screenshot of how you input the passphrase, when it works?

@saggafarsyad
Copy link

@joaomoreno Here is the screenshot

screenshot_10

I use ssh from git-bash as my ssh agent. When I open git-bash, it will ask for passphrase. Then I run VS Code by writing code.

@joaomoreno
Copy link
Member

@saggafarsyad Created #10064 for this.

PS: Cool ConEmu theme btw.

@aggieben
Copy link

aggieben commented Aug 24, 2016

I am also seeing behavior very similar to this, but I'm using plink.exe and pageant.exe as my ssh client and agent, respectively. Everything works fine in the console, and in Git Kraken - but vscode does not appear to either a) be using plink.exe or b) using pageant.

Update: nevermind. It looks like I can set GIT_SSH_COMMAND. Maybe code should have a setting for this instead of relying on an environment variable, but this works for me.

@aggieben
Copy link

Also: the value of the command has to be quoted. It seems like Code should be more defensive in how it uses the environment variable; this is what I had to do to get it to work.

@ashes999
Copy link

ashes999 commented Aug 29, 2017

Did anyone figure out how to fix this? I'm running into the same issue today (VSCode 1.15.1).

The core issue seems to be this; in my case, I had two SSH keys: one generated by GitHub for Windows and one hand-generated with ssh-keygen.

For some reason, Visual Studio Code picked up the latter one instead of the former. To solve this, I added the latter to GitHub, and everything works now.

@lbenie
Copy link

lbenie commented Sep 18, 2017

I found this on stackoverflow. I've used it and it works like a charm.

@gomestai
Copy link

still having same issue

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

9 participants