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

Re: [BUG?] git-daemon 2.49.0 in F40 no longer exports user directories

From
RORussell King (Oracle) <linux@armlinux.org.uk>
Date
Jul 27, 2025, 09:14 UTC
Message-ID
<aIXuCv7hRyJq-Twm@shell.armlinux.org.uk>
In-Reply-To
<20250727064542.GA3091411@coredump.intra.peff.net>
On Sun, Jul 27, 2025 at 02:45:42AM -0400, Jeff King wrote:
Show 23 quoted lines
> On Sat, Jul 26, 2025 at 09:53:27AM -0400, Todd Zullinger wrote:
> 
> > I was curious, so I took Peff's recipe and gave it a try. 
> > 
> >     sudo dnf -y install git-daemon
> >     sudo systemctl enable --now git.socket
> >     mkdir ~/public_git
> >     git init --bare ~/public_git/repo.git
> >     git -C ~/public_git/repo.git --work-tree=. commit --allow-empty -m foo
> >     sudo git config --system --add safe.directory ~/public_git/\*
> >     git ls-remote git://localhost/~test/repo.git
> > 
> > And that fails as it does for Russell.  I suspected SELinux,
> > which is enabled by default on Fedora.  With luck, you have
> > not already ruled that out.
> 
> Interesting. That would explain why I didn't see the problem on my
> Debian system.
> 
> I am still puzzled why Russell would see the message he does, though.
> From my read of the code, seeing "not in directory list" but not seeing
> "...does not appear to be a git repository" implies that enter_repo()
> succeeds, but ok_paths is non-empty and forbids it.

Yes, I had an override in systemd that I'd forgotten about to work around a previous issue (because the previous version we had on the machine required the paths on the end of the git-daemon command line.)

I wonder if there was a bug - --export-all broke, and then required the directories to be listed, and now it's been "fixed" and now the listed directories become a list of those to exclude?

The override.conf had something like:
ExecStart=-/usr/libexec/git-core/git-daemon --export-all \
  --user-path=public_git --inetd --log-destination=stderr --verbose \
    --interpolated-path='/var/lib/git/%%H%%D' \
    /var/lib/git/git.armlinux.org.uk \
    /home/rmk/public_git

I can't remember exactly now as I've deleted the last two paths, and added --base-path=/var/lib/git - and now it's working.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Previous: Jeff King
Message 5 of 5 in “[BUG?] git-daemon 2.49.0 in F40 no longer exports user directories”
  1. Russell King (Oracle)Jul 25, 2025
  2. Jeff KingJul 26, 2025
  3. Todd ZullingerJul 26, 2025
  4. Jeff KingJul 27, 2025
  5. Russell King (Oracle)Jul 27, 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.