Skip to content

Git clone with Windows 10 SSH.EXE: unexpected disconnect while reading sideband #3080

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

Closed
kstrophus opened this issue Mar 4, 2021 · 5 comments
Labels

Comments

@kstrophus
Copy link

Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

Updated GIT_SSH to use the Windows 10 System32\SSH.EXE in order to take advantage of the new native OpenSSH Authentication Agent now included with the system. It remembers the SSH certificate passwords nicely.

Tried to clone a big repo after.

What did you expect to happen? (Expected behavior)

Clone of repo success.

What happened instead? (Actual behavior)

"unexpected disconnect while reading sideband" error

What's different between what you expected and what actually happened?

The repo did not clone at all.

Anything else you want to add:

Removing the GIT_SSH override solves it but then presents the SSH cert password prompt every...bloody...time.

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.

[System Info]
git version:
git version 2.30.1.windows.1
cpu: x86_64
built from commit: ca911fc
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
uname: Windows 10.0 18363
compiler info: gnuc: 10.2
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe

[Enabled Hooks]
not run from a git repository - no hooks to show

@dscho
Copy link
Member

dscho commented Mar 4, 2021

Does it work when you do not override GIT_SSH?

@dscho dscho added the unclear label Mar 4, 2021
@kstrophus
Copy link
Author

Actually, I just found this. I see some comments on there from you too @dscho : Early EOF errors when running git fetch over ssh

@kstrophus
Copy link
Author

It works if I do not override GIT_SSH but I lose the native Windows SSH agent ability to remember my credentials. I uninstalled the default Windows 10 OpenSSH client and manually installed the Windows OpenSSH v8.1.0.0p1-Beta (still the current latest), but same thing happens.

@Okeanos
Copy link

Okeanos commented Aug 4, 2021

@kstrophus you may want to try again once a Git build was released that contains git-for-windows/build-extra/pull/367 – it makes choosing your preferred OpenSSH for Git way easier.

As far as I can tell there're two-ish things going on:

  • bundled SSH uses pseudo linux socket files and the setup is convoluted – bundled agent integration with other tools works mostly but doesn't play along with Windows OpenSSH (agent).
  • Windows OpenSSH can be used throughout Git (GIT_SSH or in the future via the installer option), however, has its own problems that are well documented as already mentioned. Tool support is spotty (Github Desktop, Sublime Merge, SourceTree); the user setup for this toolchain is simpler, though.

I am not sure whether these deficiencies can be addressed here. I would assume bundled SSH's inability to talk to Windows' ssh-agent should be addressed in the upstream project. External OpenSSH being unstable is definitely not a Git issue I'd say.

@dscho
Copy link
Member

dscho commented Aug 17, 2021

Since Git for Windows v2.33.0 was released with the option to prefer the system OpenSSH, I'll close this ticket.

@dscho dscho closed this as completed Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants