Vscode: Git: Allow to configure location of ssh keys

Created on 28 Aug 2017  路  6Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.15.1
  • OS Version: Windows 10 Pro Insider Slow

Steps to Reproduce:

  1. Delete %USERPROFILE%\.ssh
  2. Launch VSCode
  3. Look at %USERPROFILE%, notice that there is now an empty .ssh folder.

Reproduces without extensions: Yes

I suspect this is being caused by VSCode's git integration, though I was unable to figure out how to redirect to where my SSH keys _actually_ live (%APPDATA%\ssh).

*out-of-scope feature-request git

Most helpful comment

I have verified that this is in fact a problem with the underlying git installation (which doesn't appear to have any mechanism for overriding the file location).

I have filed an issue for this at https://github.com/git-for-windows/git/issues/1285

I would love to see VSCode move away from shelling out to git and instead interacting with git via library (e.g., libgit2), though I recognize that is a large feature request.

All 6 comments

If your keys live in %APPDATA%\ssh, what tools to you use to interact with your git repos, besides VS Code? I'm pretty sure command line git won't fetch the keys from that location.

I use git extensions, which is backed by Git for Windows and Putty for SSL handling. I'm not sure exactly which part of the tooling prompts me for keys, but when it does it is via an open dialog box where I can point it at my keys and it (generally) remembers where I pointed it. I _think_ the dialog is coming from the PuTTy Ageant, but with so many tools involved its hard to say specifically.

Should I take your inquiry to imply that git using OpenSSL does not support a configurable SSH key path? Is it the underlying git library used in VSCode that is creating the directiory? If so, can you refer me to the appropriate repository to file this issue?

VS Code doesn't use an underlying library. It spawns git. So you'd get exactly the same behavior if you were to simply call git fetch from a command prompt. But Code definitely could benefit from having a configuration setting to specify where the keys are located.

I have verified that this is in fact a problem with the underlying git installation (which doesn't appear to have any mechanism for overriding the file location).

I have filed an issue for this at https://github.com/git-for-windows/git/issues/1285

I would love to see VSCode move away from shelling out to git and instead interacting with git via library (e.g., libgit2), though I recognize that is a large feature request.

use tortisegit's key agent for gitbash:

setx GIT_SSH "C:\Program Files\TortoiseGit\bin\TortoiseGitPlink.exe"

This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

curtw picture curtw  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments

villiv picture villiv  路  3Comments

trstringer picture trstringer  路  3Comments

sijad picture sijad  路  3Comments