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

Failure when receiving data from the peer #4194

Closed
1 task done
melnele opened this issue Dec 22, 2022 · 19 comments · Fixed by git-for-windows/MINGW-packages#64
Closed
1 task done

Failure when receiving data from the peer #4194

melnele opened this issue Dec 22, 2022 · 19 comments · Fixed by git-for-windows/MINGW-packages#64
Assignees
Milestone

Comments

@melnele
Copy link

melnele commented Dec 22, 2022

  • 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?
    64-bit
$ git --version --build-options
Git-2.39.0.2-64-bit.exe
  • Which version of Windows are you running?
    Windows 11 64-bit
$ cmd.exe /c ver
Microsoft Windows [Version 10.0.22621.963]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
Editor Option: Notepad++
Custom Editor Path: 
Default Branch Option:  
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Disabled
Enable FSMonitor: Disabled

Details

  • Which terminal/shell are you running Git from?
    Bash/CMD

  • What commands did you run to trigger this issue? If you can provide a
    Minimal, Complete, and Verifiable example
    this will help us understand the issue.

git fetch
or
git push

I then downgraded to git version 2.38.1.windows.1 and it worked

@dscho
Copy link
Member

dscho commented Dec 22, 2022

I then downgraded to git version 2.38.1.windows.1 and it worked

@melnele That's a large step, testing only v2.39.0(2) and v2.38.1.

Could you bisect through the snapshots to figure out what causes the regression? My guess is that it's the cURL update, and only v2.39.0(2) has the regression, but not the preceding snapshot (could you also test this snapshot which sadly failed to upload?).

@melnele
Copy link
Author

melnele commented Dec 22, 2022

@dscho you are correct I just instaled Git-2.39.0-64-bit.exe and it's working

@melnele
Copy link
Author

melnele commented Dec 22, 2022

(could you also test this snapshot which sadly failed to upload?).

@dscho I tested it and it's working

@dscho
Copy link
Member

dscho commented Dec 22, 2022

@melnele would you have any public URL with which I could try to reproduce the problem?

@melnele
Copy link
Author

melnele commented Dec 22, 2022

@dscho unfortunately the repos I'm working on are private on bitbucket
but I found a similar repo that is public

$ git clone https://bitbucket.org/anand980980/angular-9-with-angular-material.git

Cloning into 'angular-9-with-angular-material'...
error: RPC failed; curl 56 Failure when receiving data from the peer
Receiving objects: 100% (276/276), 351.28 KiB | 524.00 KiB/s, done.
Resolving deltas: 100% (142/142), done.

@dscho
Copy link
Member

dscho commented Dec 22, 2022

$ git clone https://bitbucket.org/anand980980/angular-9-with-angular-material.git

That reproduces here, but only with the Secure Channel backend. It does work with the OpenSSL backend. That suggests that this is a Secure Channel-specific regression in cURL.

I won't be able to investigate or drive this any further in the next few weeks, so @melnele please use this as a workaround if you want to upgrade: git config --global http.sslBackend openssl.

@melnele
Copy link
Author

melnele commented Dec 23, 2022

This indeed works thank you for your help.

@Nashrah-Fatima
Copy link

fatal: unable to connect to github.com:
github.com[0: 20.207.73.82]: errno=Unknown error
This error I got in gitbash

@malshunaef

This comment was marked as off-topic.

@malshunaef

This comment was marked as off-topic.

@dscho
Copy link
Member

dscho commented Jan 11, 2023

$ git clone https://bitbucket.org/anand980980/angular-9-with-angular-material.git

That reproduces here, but only with the Secure Channel backend. It does work with the OpenSSL backend. That suggests that this is a Secure Channel-specific regression in cURL.

I just tried the same command with a custom build of libcurl-4.dll off of https://github.com/curl/curl's tip revision and it did not fail (read: it seems that the regression might have been fixed). Next stop: I'm building libcurl-4.dll off of the curl-7_87_0 tag. If that shows the regression, I will bisect to figure out whether we can quickly do a backport (seeing as no hot-fix version of cURL was released).

@dscho
Copy link
Member

dscho commented Jan 11, 2023

It was a bit harder to bisect this than expected because somewhere in the middle the regression became a flake, and only later did it get fixed. After testing a while I am pretty confident that the regression is fixed by curl/curl@54120ef. I'll test with this a bit more, and pending that testing I will open a PR and get fixed Pacman packages deployed.

dscho added a commit to dscho/MINGW-packages that referenced this issue Jan 11, 2023
A regression introduced into cURL v7.87.0 causes clones from Bitbucket
repositories that use the Secure Channel backend to fail in this fashion:

	$ git -c http.sslbackend=schannel clone https://[email protected]/jurko/testinggit.git
	Cloning into 'testinggit'...
	remote: Enumerating objects: 3, done.
	remote: Counting objects: 100% (3/3), done.
	remote: Compressing objects: 100% (2/2), done.
	remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
	error: RPC failed; curl 56 Failure when receiving data from the peer
	Unpacking objects: 100% (3/3), 590 bytes | 98.00 KiB/s, done.

The fix for this was already applied in cURL's main-line branch. Let's
backport it.

This fixes git-for-windows/git#4194

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho added this to the Next release milestone Jan 11, 2023
@dscho dscho self-assigned this Jan 11, 2023
@dscho
Copy link
Member

dscho commented Jan 11, 2023

/add release note bug A regression introduced in Git for Windows v2.39.0(2) that prevented cloning from Bitbucket was fixed.

The workflow run was started

@dscho
Copy link
Member

dscho commented Jan 12, 2023

@melnele @jurko-gospodnetic please test the latest snapshot.

@melnele
Copy link
Author

melnele commented Jan 12, 2023

@melnele @jurko-gospodnetic please test the latest snapshot.

@dscho
I switched back to
git config --global http.sslBackend schannel
and it's working.

@dscho
Copy link
Member

dscho commented Jan 13, 2023

@melnele @jurko-gospodnetic please test the latest snapshot.

@dscho
I switched back to
git config --global http.sslBackend schannel
and it's working.

Thank you for confirming the fix!

@kandersondaxsonics
Copy link

Thank you for this fix. I apologize for not filing this earlier myself. I figured it was something local to my machine and/or network, not something more global, as I was the only one in my office having the issue. I was apparently the only one on the December release! I will also confirm that the latest release (2.39.1) fixed this for me.

The really frustrating part is that it would work about 1/10 of the time, so it would usually fail, but not always.

@dscho
Copy link
Member

dscho commented Jan 18, 2023

The really frustrating part is that it would work about 1/10 of the time, so it would usually fail, but not always.

Yep, I also found that very frustrating during my bisecting.

@jurko-gospodnetic
Copy link

jurko-gospodnetic commented Jan 22, 2023 via email

ammyk9 pushed a commit to ammyk9/MINGW-packages that referenced this issue Aug 8, 2024
A regression introduced into cURL v7.87.0 causes clones from Bitbucket
repositories that use the Secure Channel backend to fail in this fashion:

	$ git -c http.sslbackend=schannel clone https://[email protected]/jurko/testinggit.git
	Cloning into 'testinggit'...
	remote: Enumerating objects: 3, done.
	remote: Counting objects: 100% (3/3), done.
	remote: Compressing objects: 100% (2/2), done.
	remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
	error: RPC failed; curl 56 Failure when receiving data from the peer
	Unpacking objects: 100% (3/3), 590 bytes | 98.00 KiB/s, done.

The fix for this was already applied in cURL's main-line branch. Let's
backport it.

This fixes git-for-windows/git#4194

Signed-off-by: Johannes Schindelin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants