You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Early EOF errors when running git fetch over ssh #2012
Exact reproduction steps are currently being developed. Since it is a race condition, trying to force this to occur is tricky, but I am able to reliable reproduce it with a private repository. Obviously, that won't help external verifcation :), so I am still developing a easily reproducible scenario given that I understand what is causing it.
Expected behavior
git clone works
Actual behavior
fatal: the remote end hung up unexpectedlyfatal: early EOFfatal: index-pack failed
### Error details
```console
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 5.1.19041.1682
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1682
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
### Version
8.9.10
### Visuals
_No response_
Reacted by nkrepo, Paul "TBBle" Hampson, octolith, Fred Silberberg, Alb0t, Patrick O'Brien, AttieG, Joan Marcè i Igual, UeJo, relative and 3 more
@cwgreene I still see the issue regularly when cloning any repository of sufficient size, so that might help get a reliable repro. Some examples are dotnet/roslyn and dotnet/runtime, in my experience.
At work I have the built-in OpenSSH client configured for Git and this issue happens constantly, to the extent that sometimes I have to pull a repo 3-6 times for it to work.
octolith (@octolith) you're saying that you have the builtin OpenSSH client and you're seeing this issue? By built-in, do you mean winssh or the one bundled with git itself? I belive that the version bundled with git itself is using a version of openssh which is built using msys.
Can you use process explorer to determine which version of ssh git is spawning? The above issue and it's proposed cause only applies to the version of ssh that is built against the non msys compatibility layer which.
If you're seeing this against the msys ssh version, something else is happening.
My pardon for the delays, I haven't had time to get a self-contained repro yet, but heck, I'll open a pull request and see if the maintainers will accept it as is.
This probably doesn't only cause problems for git, but also when piping tar content over from linux to a windows client, if my memory serves me correctly! I think the Windows SSH client clauses the connection too early and causes a "truncated tar" file.
Uxorious (@Uxorious)
One interesting thing during my tests is that:
If you uninstall OpenSSH Client from System>Optional features, and uninstall OpenSSH from Apps > Installed apps.
Then you add back OpenSSH Client from System>Optional features
You will get both:
C:\Windows\System32\OpenSSH\ssh.exe @ 8.6p1
C:\Program Files\OpenSSH\ssh.exe @ 9.4p1
And 9.4p1 even not the latest, is greater than 9.2.2.0p1, which contains the fix.
So I think, if someone is not using an old Windows copy like me (upgraded per year from win10 21H2 to now win11 23H2), or they didn't install the "OpenSSH Client" feature in the first place. And now if they newly enable "OpenSSH Client" feature, they would get the nearlylatest 9.4p1 and you-dont-want-in-system32 8.6p1 as well.
Activity
333fred commentedon Oct 12, 2022
@cwgreene I still see the issue regularly when cloning any repository of sufficient size, so that might help get a reliable repro. Some examples are
dotnet/roslynanddotnet/runtime, in my experience.octolith commentedon Oct 13, 2022
At work I have the built-in OpenSSH client configured for Git and this issue happens constantly, to the extent that sometimes I have to pull a repo 3-6 times for it to work.
tessprime commentedon Oct 27, 2022
octolith (@octolith) you're saying that you have the builtin OpenSSH client and you're seeing this issue? By built-in, do you mean winssh or the one bundled with git itself? I belive that the version bundled with git itself is using a version of openssh which is built using msys.
Can you use process explorer to determine which version of ssh git is spawning? The above issue and it's proposed cause only applies to the version of ssh that is built against the non msys compatibility layer which.
If you're seeing this against the msys ssh version, something else is happening.
My pardon for the delays, I haven't had time to get a self-contained repro yet, but heck, I'll open a pull request and see if the maintainers will accept it as is.
tgauth commentedon Apr 17, 2023
closing - fix available in https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v9.2.2.0p1-Beta
RealLitb commentedon Jun 15, 2023
This probably doesn't only cause problems for git, but also when piping tar content over from linux to a windows client, if my memory serves me correctly! I think the Windows SSH client clauses the connection too early and causes a "truncated tar" file.
berniegp commentedon Nov 7, 2023
Hi, is a new version of OpenSSH planned for inclusion in Windows 10 updates at some point?
Uxorious commentedon Jan 19, 2024
Same for Windows 11. A fix would be nice - seeing this all the time.
TroutZhang commentedon Jul 15, 2024
Still see this error randomly on Win11 23H2(10.0.22631.3880) with OpenSSH 9.5.0.0(through Microsoft.OpenSSh.Beta from winget).
My ssh info:
And version for each
TroutZhang commentedon Jul 22, 2024
It's actually fixed, just need to make sure our git is using the newer version SSH.exe.
Coming back from #1322 (comment)
Uxorious commentedon Jul 22, 2024
Does anybody know why Microsoft still hasn't included this fix in one of the bajillion Windows updates since this?
TroutZhang commentedon Jul 23, 2024
Uxorious (@Uxorious)
One interesting thing during my tests is that:
If you uninstall OpenSSH Client from System>Optional features, and uninstall OpenSSH from Apps > Installed apps.
Then you add back OpenSSH Client from System>Optional features
You will get both:
And 9.4p1 even not the latest, is greater than 9.2.2.0p1, which contains the fix.
So I think, if someone is not using an old Windows copy like me (upgraded per year from win10 21H2 to now win11 23H2), or they didn't install the "OpenSSH Client" feature in the first place. And now if they newly enable "OpenSSH Client" feature, they would get the nearly latest 9.4p1 and you-dont-want-in-system32 8.6p1 as well.
TroutZhang commentedon Dec 4, 2024
for win11 24H2: