Hiya, Harald.I'm not sure if this is intended behaviour, but I've always ever had that problem running my own servers when the group does not have write access to the directory containing the repository.
You might, as a troubleshooting step, try giving the group write access and see if that makes the problem go away.
Alternatively, you could also just add the directory as an exception using the command provided.
On 5/21/24 01:40, Harald Dunkel wrote:
Hi folks, since 2.45.1 (upgraded from 2.40.something) I cannot pull my etckeeper repositories anymore: # su - etckeeper % cd /archive/host.example.com % git remote -v origin host.example.com:/etc (fetch) origin host.example.com:/etc (push) % git pull fatal: detected dubious ownership in repository at '/etc/.git' To add an exception for this directory, call: git config --global --add safe.directory /etc/.git fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Please note there is git-shell on the remote side. Question is, what is dubious about the existing access bits of the remote repo? Currently I have root@xxxxxxxxxxxxxxxx:/etc/.git# ls -al total 532 drwxr-s--- 8 root etckeeper 4096 May 21 10:14 . drwxr-xr-x 242 root root 20480 May 18 06:28 .. -rw-r-s--- 1 root etckeeper 2716 May 17 14:04 COMMIT_EDITMSG -rw-r-s--- 1 root etckeeper 23 Jun 5 2013 HEAD drwxr-s--- 2 root etckeeper 4096 Jun 5 2013 branches -rw-r-s--- 1 root etckeeper 92 Jun 5 2013 config -rw-r-s--- 1 root etckeeper 37 Jun 5 2013 description -rw-r-s--- 1 root etckeeper 70979 Jun 28 2021 gitk.cache drwxr-s--- 2 root etckeeper 4096 Jun 5 2013 hooks -rw-r----- 1 root etckeeper 397408 May 21 10:14 index drwxr-s--- 2 root etckeeper 4096 Jul 11 2023 info drwxr-s--- 3 root etckeeper 4096 Jul 11 2023 logs drwxr-s--- 260 root etckeeper 4096 May 17 14:04 objects -rw-r-s--- 1 root etckeeper 105 Jul 11 2023 packed-refs drwxr-s--- 4 root etckeeper 4096 Jun 5 2013 refs Doesn't look dubious at all. Unless you are root you have to be in the etckeeper group to get read access, restricted by the top level directory and all underneath files and directories . Note the sticky bit for the etckeeper group. What is wrong with that? Every insightful comment is highly appreciated. Regards Harri
Attachment:
OpenPGP_0xC8B9B8C9DAC006F7.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature