git-for-windows / git

A fork of Git containing Windows-specific patches.
http://gitforwindows.org/
Other
8.31k stars 2.52k forks source link

Git clone fails with 'error: RPC failed; curl 23 Failed writing received data to disk/application' #4942

Closed Zayyy01 closed 4 months ago

Zayyy01 commented 4 months ago

Setup

$ git --version --build-options

git version 2.45.0.windows.1
cpu: x86_64
built from commit: b5d0511969ccd9ab86395c37e5a7619d8b4e7c32
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.22631.3447]
Editor Option: CustomEditor
Custom Editor Path: C:\Program Files\Beyond Compare 4\BCompare.exe
Default Branch Option:  
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: ConHost
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Enabled
Enable Pseudo Console Support: Disabled
Enable FSMonitor: Enabled

Only fails if the git server uses (http) compression

Details

Powershell

Only fails if the git server uses (http) compression
git clone https://username:pwd@host.xyz/username/repository.git

clone the repository successfully

error: RPC failed; curl 23 Failed writing received data to disk/application

Repository is private.

There is a known curl issue (https://github.com/curl/curl/issues/13212) which can be related to this. It's present both in 8.7.0 and 8.7.1 curl versions. It has been fixed in https://github.com/curl/curl/pull/13219 but there is no new curl release yet.

dscho commented 4 months ago

It has been fixed in curl/curl#13219 but there is no new curl release yet.

@Zayyy01 could you try your hand at a backport? It's a single commit that could be integrated like this backport: https://github.com/git-for-windows/MINGW-packages/commit/e5725f2db88e1e217d15a2d1e8a46b29ffea479b. If you then open a PR, the PR build will produce build artifacts including a Pacman package (which is really just a glorified .tar archive) whose contents you could unpack over a portable Git to verify that the fix works in your scenario (I cannot help testing that scenario because the repository is private).

If you can do that and confirm that this patch fixes your issue, I will gladly merge the PR!

Zayyy01 commented 4 months ago

@dscho thank you for the detailed answer. As I see curl 8.7.2 is planned to be released on May 22, 2024. As it's only a week from now, I'll wait for the official release and in the meantime temporarily switch off http compression in our internal git server.

dscho commented 4 months ago

@Zayyy01 if we wait for 8.7.2, we might miss the Git v2.45.2 train. The next Git version (and hence also the next Git for Windows version) is scheduled for end of July.