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

Error using git in ssh repository in Git Bash #1918

Closed
1 task done
Jule- opened this issue Nov 7, 2018 · 3 comments
Closed
1 task done

Error using git in ssh repository in Git Bash #1918

Jule- opened this issue Nov 7, 2018 · 3 comments

Comments

@Jule-
Copy link

Jule- commented Nov 7, 2018

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

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

git version 2.19.1.windows.1
cpu: x86_64
built from commit: 11a3092e18f2201acd53e45aaa006f1601b6c02a
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.17134.345]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: VisualStudioCodeInsiders
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: LFOnly
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled
Enable Builtin Rebase: Disabled
Enable Builtin Stash: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

I am using on the same machine WSL, Cmder, Git Bash, SourceTree, Putty Pageant. I did not notice what update start messing up my dev environment. Windows, SourceTree, Git,... But it was working in the near past.

Details

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

Git Bash

# May be the clone could trigger the issue
git clone [email protected]:git-for-windows/git.git
cd git
# In my case I have only seen it with basically all remote git commands
git fetch
  • What did you expect to occur after running these commands?

Doing the job.

  • What actually happened instead?

Command failed:

$ git fetch
CreateProcessW failed error:193
ssh_askpass: posix_spawn: Unknown error
...

I have achieved to fix this issue changing script execution policy. Don't know why but now it works even after having my execution policy back to Restricted.

What I've done:

  1. Start PowerShell with administration rights
  2. Get my current script execution policy for later
$currentExecutionPolicy = Get-ExecutionPolicy
  1. Set it to run local scripts not coming from internet
Set-ExecutionPolicy RemoteSigned
  1. Try to fetch an ssh repository
  2. (optional) Then restore my previous script execution policy, and it still works!
Set-ExecutionPolicy $currentExecutionPolicy

Don't know if it can help people with the same issue or even if you can somehow fix this issue by warning users or other...

@dscho
Copy link
Member

dscho commented Dec 26, 2018

Quite honestly, I am puzzled. Git for Windows' executables are code-signed, on purpose, to prevent something very much like what you are describing...

@Jule-
Copy link
Author

Jule- commented Dec 27, 2018

I am too... 😕

Maybe my "fix" is not the thing that has made the trick but for what I remember it was the only thing I have changed before it has worked again. Maybe SourceTree or something else has messed up my PATH and done strange things with Pageant...

I guess only a very rare corner issue... Not something to worry about.

@dscho
Copy link
Member

dscho commented Jan 2, 2019

Okay, then, I'll not worry about it 😄 Thanks for your feedback!

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

No branches or pull requests

2 participants