git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-daemon doesn't work as expected in v2.45.1 and friends
@ 2024-05-20  8:21 Ondrej Pohorelsky
  2024-05-21 13:27 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 4+ messages in thread
From: Ondrej Pohorelsky @ 2024-05-20  8:21 UTC (permalink / raw)
  To: git

Hi,

during testing the newest security releases in RHEL and in Fedora, we
have encountered broken git-daemon behavior. In a nutshell, git client
refuses to clone locally hosted repositories because of detected
dubious ownership.

I'll paste part of the Fedora report [0] here:

```
Upon clone, git-daemon logs the following:

    [1482] Connection from ::1:45090
    [1482] Extended attribute "host": localhost
    [1482] Extended attribute "protocol": version=2
    [1482] Request upload-pack for '/test.git'
    fatal: detected dubious ownership in repository at '/var/lib/git/test.git'
    To add an exception for this directory, call:
            git config --global --add safe.directory /var/lib/git/test.git


Reproducible: Always

Steps to Reproduce:
1. Create repository under /var/lib/git/test.git
2. Ensure git.socket systemd unit is started
3. Run git clone git://localhost/test.git
Actual Results:
git server refuses to read /var/lib/git/site.git because it detects dubious
ownership
```

Is there a way to make git-daemon hosted repositories safe to clone,
without specifying safe.directory in git config? AFAIK this is widely
used feature of Git not only by the end users, but also quite a lot of
tests rely on it.

[0]https://bugzilla.redhat.com/show_bug.cgi?id=2281530

Cheers,
Ondřej Pohořelský


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-21 20:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20  8:21 git-daemon doesn't work as expected in v2.45.1 and friends Ondrej Pohorelsky
2024-05-21 13:27 ` Konstantin Ryabitsev
2024-05-21 15:20   ` Junio C Hamano
2024-05-21 20:40     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).