Re: [BUG?] git-daemon 2.49.0 in F40 no longer exports user directories
- From
Jeff King <peff@peff.net>
- Date
- Jul 27, 2025, 06:45 UTC
- Message-ID
- <20250727064542.GA3091411@coredump.intra.peff.net>
- In-Reply-To
- <aITd13mTx8t1dQbO@teonanacatl.net>
On Sat, Jul 26, 2025 at 09:53:27AM -0400, Todd Zullinger wrote:
Show 13 quoted lines
> 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.
Probably not that important if your suggestions here solve his problem. But of course if you can easily satisfy my curiosity by running through a debugger, I'd be happy. ;)
It might just be that I'm mis-reading the code.
-Peff