gitea: why git clone fail because of transfer closed with outstanding read data remaining

72 Views Asked by At

I have tried what was proposed in another question and no success, though I'm not certain my situation is identical

On the server myserver: gitea 1.20.6

2024/02/17 23:18:58 ...dules/git/command.go:281:Run() [D] git.Command.RunDir(/home/gitea/gitea-repositories/mydir/myrepo.git): /usr/bin/git -c protocol.version=2 -c credential.helper= -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= upload-pack --stateless-rpc /home/gitea/gitea-repositories/mydir/myrepo.git
2024/02/17 23:19:02 ...eb/routing/logger.go:68:func1() [W] router: slow      POST /mydir/myrepo.git/git-upload-pack for 192.168.1.98:0, elapsed 3956.3ms @ repo/http.go:492(repo.ServiceUploadPack)

After 2 minutes

2024/02/17 23:21:11 ...eb/routing/logger.go:102:func1() [I] router: completed POST /mydir/myrepo.git/git-upload-pack for 192.168.1.98:0, 200 OK in 133459.6ms @ repo/http.go:492(repo.ServiceUploadPack)

which to me says that gitea server served successfully.

On the client side

GIT_CURL_VERBOSE=1 GIT_TRACE=1  git clone --sparse --depth 1 https://myuser:mypwd@myserver/git/mydir/myrepo.git 

The logs are like this:

23:18:59.034132 run-command.c:657       trace: run_command: git --shallow-file /home/myuser/myrepo/.git/shallow.lock index-pack --stdin -v --fix-thin '--keep=fetch-pack 31498 on myclient'
remote: Enumerating objects: 44654, done.
23:18:59.037831 git.c:463               trace: built-in: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 31498 on myclient'
remote: Counting objects: 100% (44654/44654), done.
23:21:11.966140 http.c:843              == Info: TLSv1.3 (IN), TLS alert, close notify (256):
23:21:11.966185 http.c:843              == Info: transfer closed with outstanding read data remaining
23:21:11.966208 http.c:843              == Info: Closing connection
23:21:11.966283 http.c:843              == Info: TLSv1.3 (OUT), TLS alert, close notify (256):
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
error: 2 bytes of body are still expected
remote: Compressing objects:  63% (27428/4353500
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

I have temporarily these global settings

git config --global -l
http.sslverify=false
http.postbuffer=524288000
http.maxrequestbuffer=524288000
core.compression=0
0

There are 0 best solutions below