我有一个网络服务器,它接受来自 Git 客户端的传入连接并将它们重定向到git-http-backend。克隆效果很好,但推送失败:
$ 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
调查传入连接,以下是上面标记连接的请求标头的一些信息,这些信息失败了:
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
我读取了 4 个字节,然后返回输出。我想知道,我在这里可能会想念什么。所以我假设客户端认为服务器支持智能 HTTP,但我没有实现它。