1

I have a webserver which accepts incoming connections from a Git client and redirects them to git-http-backend. A clone works very well, but a push fails with:

$ git push -u origin
Enumerating objects: 4317, done.
Counting objects: 100% (4317/4317), done.
Delta compression using up to 16 threads
Compressing objects: 100% (1190/1190), done.
fatal: the remote end hung up unexpectedly           <----------
Writing objects: 100% (4317/4317), 1.14 MiB | 16.75 MiB/s, done.
Total 4317 (delta 3115), reused 4317 (delta 3115), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date

Investigating the incoming connections, here are a few infos of the request header of the marked connection from above which failed:

POST /foo.git/git-receive-pack HTTP/1.1" 200 -
Content-Type application/x-git-receive-pack-request
Accept application/x-git-receive-pack-result
Transfer-Encoding chunked
CONTENT_LENGTH 4
fatal: the remote end hung up unexpectedly

I read the 4 bytes and then return the output. I am wondering, what I might miss here. So I assume the client thinks the server supports Smart HTTP, but where I did not implement it.

Daniel Stephens
  • 2,371
  • 8
  • 34
  • 86

0 Answers0