git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git pack protocol question: sideband responses in case of errors?

From
Christian Halstrick <christian.halstrick@gmail.com>
Date
May 13, 2015, 09:03 UTC
Message-ID
<CAENte7j9De5Bqu2jDcmXQAxZheSGo+EntzsYUaen0N7cnuiCDQ@mail.gmail.com>
Hi,

since a long time I am hitting very seldom errors when pushing with a jgit client leading to "invalid channel 101" errors on client side. I was always wondering why it was always the channel "101". Now I found out with wireshark and it leads me to a question regarding the git pack protocol [1] and the sideband capability [2] which I couldn't answer from the technical docs.

This is what happened: A client wants to push over http to a git server. In the beginning they negotiated to use side-band-64k and report-status capabilities. Everything works fine, Packfile data transmission starts and sideband communication is ok. Now the server hits a severe problem persisting the packfile and wants to stop the transport. The git server hit's quotas on the filesystem usage and is not allowed to persist that big file. My git server (I use a modified gerrit server) intends to send back a packet line "0013error: ...". But the client when reading that respond still thinks we should use sideband communication and interpretes the "e" from "error" as channel. The ascii code of "e" is the solution why it was always "invalid channel 101"

Here is my question:
- When exactly should sideband communication during a http based push
start and when should it end? Especially in case of an error on the
server side. Is the server allowed to switch to non-sideband
communication under special conditions? E.g. when the server responds
not with 200OK but with 413 (entity too large).
- Is responding with status code 200 mandatory when talking git pack
protocol? Am I allowed as git server to respond with status code 413
and fill the body of the response with the status report?
Ciao
  Chris

[1] https://raw.githubusercontent.com/git/git/master/Documentation/technical/pack-protocol.txt [2] https://raw.githubusercontent.com/git/git/master/Documentation/technical/protocol-capabilities.txt

Next: Shawn Pearce
Message 1 of 2 in “git pack protocol question: sideband responses in case of errors?”
  1. Christian HalstrickMay 13, 2015
  2. Shawn PearceMay 13, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.