Win32-OpenSSH
Win32-OpenSSH copied to clipboard
Cloning a Git repository using ssh.exe hangs
When I try to use your version of ssh.exe with Git to clone a repository, it hanges.
Steps to Reproduce
- Install Git for Windows (I'm on 2.10.1 on Windows 7, bot x64)
- Open a new PowerShell prompt (so git.exe is in your PATH)
- Set the GIT_SSH environment variable to point to Win32-OpenSSH's ssh.exe: `Set-Item env:GIT_SSH "C:\Program Files\Open-SSH-Win64\ssh.exe"
- Clone a Git repository using SSH:
git clone ssh://HOSTNAME/REPO REPO
. - Note that the git.exe command hangs.
ssh.exe is deadlocking at file read in 'fileio_ReadFileEx()'. Looking at the fd table, the index is 4, which is STD_INPUT.
git clone [email protected]:PowerShell/openssh-portable.git The underlying cmd is ssh.exe [email protected] "git-upload-pack 'PowerShell/openssh-portable.git'"
I'm seeing this as well, in v0.0.19.0
This has been open for nearly a year, is this being considered for a fix? Not having this bug fixed will completely block my usage of the OpenSSH client for Windows.
🎉 thanks for the update @manojampalam !
@anurse, this is due to the same issue as #752. Can you try the workaround in Setting up a Git server on Windows using Git for Windows and Win32_OpenSSH. please let me know if you see any other issue.
Move this issue to Beta until we have a proper fix on server.
I can try the workaround later if you need verification of it, but I've already switched back to using msys OpenSSH because of the issue and the workaround is pretty invasive, so I'll probably just wait for a proper fix.
Hang on, I'm confused by how the workaround should fix this issue. In my case, I'm cloning from github.com
, which is not running Win32_OpenSSH on the server, it is running the upstream Unix version of OpenSSH. The workaround seems to be designed to fix cloning issues with a Win32_OpenSSH server, so it wouldn't apply. Am I misunderstanding it?
Works for me with 0.0.24.0, but very slow 300 Kb/s cloning from GitHub (Git SSH give me 9Mb/s)
This by far is the easier way to get around the double quote issue:
powershell New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\Git\bin\bash.exe" -PropertyType String -Force
This changes the default OpenSSH shell to bash.
This is still happening today. git clone
hangs.