I’m working on a repository that I’ve been using for several years. The local clone on my machine is in “~/dev/repo_name”. The remote has it stored in /var/git/repo_name .
All of a sudden this afternoon (with no users of the repository knowingly having changed anything) I am getting
fatal: detected dubious ownership in repository at
‘/var/git/repo_name’ To add an exception for this directory, call:git config –global –add safe.directory /var/git/repo_name fatal:
Could not read from remote repository.Please make sure you have the correct access rights and the repository
exists.
I have tried the suggested fix, as well as other variants found on SE, but none have helped.
ssh-ing into the remote finds that the folder ownership is unchanged (it’s a group called “git users” which includes the user I use to connect via git.)
Also, although I can’t be certain, the speed by which I get the “dubious ownership detected” message implies that this is a local issue, despite listing the remote’s directory path.
What can I try next?