Bug 2281530
| Summary: | git daemon complains about dubious ownership of repository | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Maddy <maddy> |
| Component: | git | Assignee: | Ondřej Pohořelský <opohorel> |
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 40 | CC: | besser82, johannes, jonathan, opohorel, pstodulk |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-05-20 08:49:12 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Thanks for the report. This failure is caused by security fixes in 2.45.1 and friends releases, which set strict policies for cloning local repositories not owned by git user. I've sent a mail to upstream with part of your bug report [0] [0]https://lore.kernel.org/git/CA+B51BGonS2DDTBQ2RsipW4Cyg5pRv0U71RAN9M1pcPjACtJ4A@mail.gmail.com/T/#u This message is a reminder that Fedora Linux 40 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '40'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 40 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. Fedora Linux 40 entered end-of-life (EOL) status on 2025-05-13. Fedora Linux 40 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed. |
After upgrade to 2.45.1, git daemon has stopped working as expected. 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/test.git because it detects dubious ownership git client reports fatal: Could not read from remote repository. Expected Results: git clone happens as usual I run my own git daemon systemd unit which doesn't use socket activation, which runs as a git user. This makes it work repositories owned by the git user, but not for repos owned by local users. My testing for this bug report is done with the git.socket unit on a fresh VM however. This also reproduces over HTTP via Apache with the following VirtualHost config: SetEnv GIT_PROJECT_ROOT /var/lib/git SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias / /usr/libexec/git-core/git-http-backend/ <Directory "/usr/libexec/git-core"> <Files "git-http-backend"> Options +ExecCGI Require all granted </Files> </Directory>