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

Cloning a Git repository using ssh.exe hangs #389

Open
splatteredbits opened this issue Oct 28, 2016 · 11 comments
Open

Cloning a Git repository using ssh.exe hangs #389

splatteredbits opened this issue Oct 28, 2016 · 11 comments

Comments

@splatteredbits
Copy link

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.
@arif-pragmasys
Copy link
Contributor

arif-pragmasys commented Dec 2, 2016

ssh.exe is deadlocking at file read in 'fileio_ReadFileEx()'. Looking at the fd table, the index is 4, which is STD_INPUT.

image

git clone [email protected]:PowerShell/openssh-portable.git
The underlying cmd is
ssh.exe [email protected] "git-upload-pack 'PowerShell/openssh-portable.git'"

@analogrelay
Copy link

I'm seeing this as well, in v0.0.19.0

@analogrelay
Copy link

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.

@manojampalam manojampalam added this to the Sep-2017-End milestone Sep 5, 2017
@analogrelay
Copy link

🎉 thanks for the update @manojampalam !

@bingbing8
Copy link
Contributor

bingbing8 commented Oct 2, 2017

@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.

@bingbing8 bingbing8 modified the milestones: Sep-2017-End, Beta Oct 2, 2017
@analogrelay
Copy link

analogrelay commented Oct 2, 2017

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.

@analogrelay
Copy link

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?

@KindDragon
Copy link

Works for me with 0.0.24.0, but very slow 300 Kb/s cloning from GitHub (Git SSH give me 9Mb/s)

@naloqab
Copy link

naloqab commented Apr 15, 2019

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.

@X9VoiD
Copy link

X9VoiD commented Aug 26, 2022

This is still happening today. git clone hangs.

@chnadell
Copy link

chnadell commented Oct 31, 2023

I find this is still a problem in gitlab CI pipelines, 7 years later. git clone hangs forever in powershell. Even with some related tricks

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

10 participants