git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Lodispoto <mike@lodispoto.com>
To: git@vger.kernel.org
Subject: Shared bare repository dubious ownership error after 2.40.1-r0
Date: Wed, 10 Jul 2024 18:16:50 -0500	[thread overview]
Message-ID: <dd703bdc-f485-4162-92a5-fd2828b69604@lodispoto.com> (raw)

Hello,

I use bare shared repositories on Alpine Edge, which have been working 
perfectly until I updated git recently (from 2.38.5-r0 to 2.45.2-r1).

My setup is a git user which owns all repositories (/home/git/*.git). 
Each repository has a group, so the ownership is git:projectname. The 
group has the same permissions as the user (-rw-rw----)

To give access to the repository, I have a user set up for the 
developer, and then I add them to the group. Each repository was 
initialized with 'git init --bare --shared'. In the config file, 
'sharedrepository = 1' is set under [core].

My issue is that somewhere between 2.40.1-r0 and 2.43.4-r0 on the 
server, I start getting the following error on the server with a user in 
the group, and remotely (tried with client version 2.39.2 and 2.45.2) 
through a user in the group:

| $ git pull
| fatal: detected dubious ownership in repository at '/home/git/project.git'
| To add an exception for this directory, call:
|
|         git config --global --add safe.directory /home/git/project.git
| fatal: Could not read from remote repository.
|
| Please make sure you have the correct access rights
| and the repository exists.

When using git 2.40.1-r0 or below, it all works and I get this:

| $ git pull
| Already up to date.

Is there a breaking change I missed that I need to change my 
configuration for?

Thank you,

Michael Lodispoto


             reply	other threads:[~2024-07-10 23:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 23:16 Mike Lodispoto [this message]
2024-07-18  4:24 ` Shared bare repository dubious ownership error after 2.40.1-r0 Colin Stagner
2024-07-18 15:00 ` Ben Zanin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd703bdc-f485-4162-92a5-fd2828b69604@lodispoto.com \
    --to=mike@lodispoto.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).