12

I am using a setup on Windows 10 x64 where I install and manage git via scoop, rather downloading and executing the installer myself. Via the PowerShell, I ran

scoop install git
scoop install openssh
[environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER')

However, now when I try to run commands in the Git Bash like

git clone [email protected]:vendor/repository.git

or a simple

git push/pull

I only get

CreateProcessW failed error:193
ssh_askpass: posix_spawn: Unknown error

instead of the Git Bash asking me for my SSH key's passphrase.

I am using the same setup (git installed via scoop) on many other Windows 10 x64 and no problems occur there. So I am not sure what is going wrong on this one. I previously had git installed without scoop on the same machine and the Git Bash was working fine. I uninstalled git completely (and also restarted the machine, just to be sure) before re-installing it via scoop instead.

The SSH_ASKPASS environment variable contains the following, in case this is relevant:

$ echo ${SSH_ASKPASS}
/mingw64/libexec/git-core/git-gui--askpass

Not sure what that folder refers to (something internal to the Git Bash presumably?), since it obviously does not exist like that on my machine.

Update

When using git-with-openssh instead of just git and openssh separately it works. However, I don't use that on my other machines, so I'd still like to know why it's not working here.

6
  • I have the same issue Commented Apr 23, 2019 at 12:40
  • @SovietFrontier apparently it is recommended to always use git-with-oppenssh due to various issues, instead of using git and openssh separately.
    – fritzmg
    Commented Apr 23, 2019 at 17:08
  • is there some instructions on how to set all that up? Commented Apr 23, 2019 at 20:55
  • Just do scoop uninstall git, scoop uninstall openssh, scoop install git-with-openssh and run the commands that are displayed in the console output afterwards.
    – fritzmg
    Commented Apr 24, 2019 at 6:47
  • 2
    I came to this page with the same error but not related to scoop. In my case, it was a conflict between OpenSSH from Git Bash and Windows 10. The solution was a mix between the solution proposed by @rsenna and this one
    – Willian
    Commented Jan 23, 2021 at 20:11

2 Answers 2

3

I'm pretty sure my answer does not address the OP's original case. But as of 2020, there seems to be a similar issue with a different way of solving it, and that's how I did in my case.

Part of the problem is, now Windows 10 has its own version of OpenSSH available, and at least in the case of my work's machine it seems that option is enabled by default.

This bundled OpenSSH is not compatible with Git bash though, so if you wants to use it, you must force git use scoop's provided OpenSSH (either from openssh or git-with-openssh packages). That means overwriting GIT_SSH environment variable, e.g. by adding a line similar to this to your .bashrc:

export GIT_SSH='C:\Users\rogs\scoop\apps\git-with-openssh\current\usr\bin\ssh.exe'

Hope it helps.

2
  • Well, after installing git and openssh via Scoop, that what you are supposed to do anyway. But in my case, when using git and openssh separately, it still did not work.
    – fritzmg
    Commented Jul 10, 2020 at 10:48
  • 1
    But that's the point, I had to do this even after installing git-with-openssh.
    – rsenna
    Commented Jul 10, 2020 at 11:49
2

Even if this topic is already very old, the problem persists. I found out that its enough to simply unset the environment variable to get rid of this error.

unset SSH_ASKPASS

Just put this in your .bash_profile and/or your .bashrc.

Not the answer you're looking for? Browse other questions tagged or ask your own question.