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

Git Push Always uses Protocol Version 0

From
ZIZsolt Imre <imrexzsolt@gmail.com>
Date
Jan 22, 2024, 08:59 UTC
Message-ID
<FD545E92-18EF-44B5-A7D5-61ECADD880E6@gmail.com>
Hi there,
I'm not entirely sure if this is a bug or I am missing something, but I thought I would share in the hope someone can help out. I'm playing around with Git and trying to implement a git server that communicates over HTTP and supports Git protocol version 2 *only*.
When I `clone` a repository, the Git client (version 2.43.0), after fetching the capabilities using protocol version 2, it proceeds to fetch the refs, again, via protocol version 2 using the `ls-refs` command.  However, when I try to `push` my changes to the repo, the Git client refuses to use protocol version 2 and tries to obtain the ref list using protocol version 0, even if I pass in the `-c protocol.version=2` command line argument.
Is there a way to make the client use only protocol version 2 instead of mixing the different protocols?
Thanks in advance for any help/guidance.
Next: Junio C Hamano
Message 1 of 4 in “Git Push Always uses Protocol Version 0”
  1. Zsolt ImreJan 22, 2024
  2. Junio C HamanoJan 22, 2024
  3. Zsolt ImreJan 22, 2024
  4. Jeff KingJan 22, 2024

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.