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

Git dumb HTTP protocol should work without update-server-info

From
Milan Hauth <milahu@gmail.com>
Date
Sep 7, 2025, 11:24 UTC
Message-ID
<CAGiEHCtP29bQRsEyLabNrLuiP96P-o7EEGi88B7pJbP0tfprxw@mail.gmail.com>
this works:

git ls-remote /path/to/repo2/ git ls-remote /path/to/repo2/.git/ git ls-remote file:///path/to/repo2/ git ls-remote file:///path/to/repo2/.git/

this fails:

python -m http.server -d /path/to/repo2/ & git ls-remote http://localhost:8000/ git ls-remote http://localhost:8000/.git/

workaround:

pushd /path/to/repo2/.git/ git --bare update-server-info mv hooks/post-update.sample hooks/post-update popd git ls-remote http://localhost:8000/

expected: dumb http remotes should behave like file remotes

> git --bare update-server-info

that command creates the file /path/to/repo2/.git/info/refs but that is just an optimization for http servers with high latency

my "dumb" http server is smart enough to handle http range requests so there is no need to download all the files from .git/

but also without http range requests this should "just work" and the user should be responsible for optimizations

as another workaround i tried to mount the .git/ directory with httpdirfs but httpdirfs fails to mount git repos, see https://github.com/fangfufu/httpdirfs/issues/183

related:
https://stackoverflow.com/questions/2085402/what-does-git-update-server-info-do
https://stackoverflow.com/questions/2278888/private-git-repository-over-http
Next: brian m. carlson
Message 1 of 11 in “Git dumb HTTP protocol should work without update-server-info”
  1. Milan HauthSep 7, 2025
  2. brian m. carlsonSep 7, 2025
  3. Milan HauthSep 7, 2025
  4. brian m. carlsonSep 7, 2025
  5. Patrick SteinhardtSep 8, 2025
  6. Junio C HamanoSep 8, 2025
  7. Patrick SteinhardtSep 9, 2025
  8. Jeff KingSep 8, 2025
  9. Junio C HamanoSep 8, 2025
  10. brian m. carlsonSep 8, 2025
  11. Jeff KingSep 9, 2025

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.