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

CreateProcessW failed error:193 #2380

Closed
dnich opened this issue Oct 29, 2019 · 6 comments
Closed

CreateProcessW failed error:193 #2380

dnich opened this issue Oct 29, 2019 · 6 comments

Comments

@dnich
Copy link

dnich commented Oct 29, 2019

I found this similar thread #1918 but the solution did not fix the problem for me.

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

$ git --version --build-options
git version 2.23.0.windows.1
cpu: x86_64
built from commit: 4db2e5c
sizeof-long: 4
sizeof-size_t: 8

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?

$ cmd.exe /c ver

Microsoft Windows [Version 10.0.18362.418]

  • What options did you set as part of the installation? Or did you choose the
    defaults?

$ cat /etc/install-options.txt

Editor Option: Notepad++
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Disabled

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Not that I am aware of

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

Git Bash

git push origin master

  • What did you expect to occur after running these commands?

upload master branch to server

  • What actually happened instead?

CreateProcessW failed error:193
ssh_askpass: posix_spawn: Unknown error
Permission denied, please try again.
CreateProcessW failed error:193
ssh_askpass: posix_spawn: Unknown error
Permission denied, please try again.
CreateProcessW failed error:193
ssh_askpass: posix_spawn: Unknown error
user@domain: Permission denied (publickey,password).
fatal: Could not read from remote repository.

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

I have replaced the user@domain with this generic since it is a private user account and I am not sure it should be posted in a public forum. I will provide it in a private message if needed.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

The problem is not with the repository, I cannot login thus never get that far.

From Git Bash I can run scp and upload files, I can run ssh and create a shell successfully, but when doing git push (or git clone) I receive the error. I am never asked to provide a password. Note that my sftp.log file is reporting failed passwords so git is sending something, probably an empty string I would guess.

This happens regardless of whether or not the server public key is in known_hosts.

@dnich
Copy link
Author

dnich commented Oct 30, 2019

This morning I was looking into this problem some more and one thing I tried was running the command 'git push origin master' from the Windows command prompt. That works. So I tried again in the Git for Windows bash and it still fails.

@dscho
Copy link
Member

dscho commented Oct 30, 2019

Use Credential Manager: Enabled

That's funny, with Credential Manager, any git push should not call ssh_askpass... or do you push via SSH? Sorry, it's not clear from the description... (and the "V" of MCVE means that the example should be verifiable on other people's machines, and I definitely cannot reproduce your problem by running git push origin master over here...)

@dnich
Copy link
Author

dnich commented Oct 31, 2019

This is a git push via ssh from within Git for Windows bash. As I mentioned, I can use ssh and scp from within git bash and I can push using ssh from windows command prompt. What fails is pushing via ssh from git bash.
I am guessing that the real error is "ssh_askpass: posix_spawn: Unknown error" and CreateProcessW is maybe a wrapper for that. Unknown error is hard to debug.
I had a similar situation a few years ago with the PayPal backend where they were expecting an IPv4 and for some reason were getting an IPv6 from me. For everyone else, their code ran fine. I'm not saying that's the issue here, but there has to be some reason so few people are reporting this, and for the last one that did here on github, the problem mysteriously "went away". I have not been so lucky. At least I have an alternate method (command prompt) that works.

@dnich
Copy link
Author

dnich commented Oct 31, 2019

Found it! There was an environment variable GIT_SSH=C:\Windows\System32\OpenSSH\ssh.exe (a valid path btw). I deleted the variable and restarted, and now the push works.
No idea how it got there if it wasn't the git installer, or previous version 2.21.0-64 which I had originally installed but didn't use ssh.

@dnich dnich closed this as completed Oct 31, 2019
@dscho
Copy link
Member

dscho commented Nov 1, 2019

Might be worth pursuing why it did not work. Would it have worked with forward slashes instead of backslashes?

@dnich
Copy link
Author

dnich commented Nov 4, 2019

The issue is there are two versions of ssh on my machine, the Git version "C:\Program Files\Git\usr\bin\ssh.exe" and the OpenSSH for Windows version "C:\Windows\System32\OpenSSH\ssh.exe" that ships with Windows 10. These are not equivalent although they take exactly the same parameters as input. The environment variable was pointing Git to the Windows version which causes the crash. When deleted, or explicitly set to the Git version, there is no crash.

One possible explanation, perhaps the Windows ssh.exe expects backslashes in its input. Although my origin has no slashes, back or forward, some other parameter behind the scenes may. Some parts of Windows will now automagically convert slashes forward to back. Command prompt probably does while Git bash does not. Thus, feeding forward slashed paths from Git bash to Windows ssh would not convert them while calling from Command Prompt would trigger the conversion. Again, don't know if that is a valid assumption, but if true, it would explain the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants