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

How to get git-daemon to work in a post-CVE world?

From
MMegaBrutal <megabrutal@gmail.com>
Date
Mar 30, 2025, 08:30 UTC
Message-ID
<CAE8gLhmKtV-Kz4jYT6r1NanmGdAyzd0CumVGsVnVpePQPAtnzQ@mail.gmail.com>
Hi Everyone,

I'm new to the list, just thought it's the best place to talk about Git. I'm running a public read-only git server with git-daemon. I've recently noticed that my repos can't be cloned and found that particular CVE which made git to verify the owners of the git repos.

fatal: detected dubious ownership in repository at '/srv/git/mgsautils.git'

The feasible solution is to declare the directory safe in .gitconfig. Contrary to my policy of not creating a home for my services, I made a home for git-daemon and placed a .gitconfig there. It seems to have an effect, because the error message has changed to the following:

fatal: detected dubious ownership in repository at '.'

Now how to solve this? It's a relative path so I wouldn't know what it has a problem with. I obviously can't declare '.' safe in .gitconfig, because it could have unintended consequences. I understand it's a security feature, but it's starting to get too cumbersome to work around to reestablish the original intended behavior. (Earlier I found out that I also need to create a .gitconfig for my git-shell users as well.)

Best regards, MegaBrutal

Next: Konstantin Ryabitsev
Message 1 of 4 in “How to get git-daemon to work in a post-CVE world?”
  1. MegaBrutalMar 30, 2025
  2. Konstantin RyabitsevMar 31, 2025
  3. MegaBrutalMar 31, 2025
  4. Konstantin RyabitsevMar 31, 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.