- VSCode Version: 1.2.1
- OS Version: Windows 10 Build 14367
Steps to Reproduce:
- Install Cygwin
- Edit .vscode/settings.json to set
git.path to point to "\\cygwin64\\bin\\git.exe
- VS Code throws up an error message of
ENOENT: no such file or directory, lstat 'C:\cygdrive', as described here
This is, of course, because Cygwin namespaces the filesystem differently. However, doing this (which usually fixes things in other tools):
"git.path": "\\cygwin64\\bin\\bash.exe git",
...then results in further confusion as Code apparently does not have a way to correctly set the environment for the git process, which then defaults to the wrong PATH:
git fetch
git show HEAD:.vscode/settings.json
git show HEAD:.vscode/settings.json
Could not create directory '/c/cygwin64/home/USERNAME/.ssh'.
ssh_askpass: exec(/usr/local/bin/win-ssh-askpass.exe): No such file or directory
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
git fetch
Could not create directory '/c/cygwin64/home/USERNAME/.ssh'.
ssh_askpass: exec(/usr/local/bin/win-ssh-askpass.exe): No such file or directory
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Trying to set PATH, HOME, etc. inline in the bash command line above fails for some reason I cannot yet fathom, but I would suggest a configuration setting git.env be created so that the environment external Git tools can be pre-configured (this would also benefit the Linux and OSX ports).
As to why this is necessary and why I can't use other Git binaries on Windows, the reason is simple:
Cygwin does Git over SSH "right", with completely identical setup in terms of SSH keys, options, CR/LF encoding, etc. Current Git for Windows simply does not work for my use case (I've tried), and, obviously, the Linux Subsystem doesn't help with this either.
Steps to Reproduce:
git.pathto point to"\\cygwin64\\bin\\git.exeENOENT: no such file or directory, lstat 'C:\cygdrive', as described hereThis is, of course, because Cygwin namespaces the filesystem differently. However, doing this (which usually fixes things in other tools):
...then results in further confusion as Code apparently does not have a way to correctly set the environment for the git process, which then defaults to the wrong PATH:
Trying to set PATH, HOME, etc. inline in the
bashcommand line above fails for some reason I cannot yet fathom, but I would suggest a configuration settinggit.envbe created so that the environment external Git tools can be pre-configured (this would also benefit the Linux and OSX ports).As to why this is necessary and why I can't use other Git binaries on Windows, the reason is simple:
Cygwin does Git over SSH "right", with completely identical setup in terms of SSH keys, options, CR/LF encoding, etc. Current Git for Windows simply does not work for my use case (I've tried), and, obviously, the Linux Subsystem doesn't help with this either.