Page MenuHomePhorge

Fix/avoid/simplify similar fatal: detected dubious ownership in repository at '/var/www/phorge'
Open, NormalPublic

Description

This is an umbrella task covering this problem and similar ones:

fatal: detected dubious ownership in repository at '/var/www/phorge'

In short:

  • Sometime it's difficult to detect these issues since they are just suppressed without error logs
  • Sometime it's not easy to fix it since the .gitconfig configuration of the webserver user is often not usable
  • The documentation does not mention anything about that

Proposed fix

At the moment, this is the proposed solution:

git config --system --add safe.directory /var/www/arcanist
git config --system --add safe.directory /var/www/phorge

Please shared a comment if that works for you.

In case, we should add that in the installation instructions.

Possible Proactive Things

  • D25236 Propose an update in the documentation to fix at system level
  • D25148 Propose a patch to discover git errors from the console, instead of having them nowhere
  • D25149 Propose a patch to allow the www-data user to read its own .gitconfig safe.directory stuff, so you can also fix without git config --system

Event Timeline

valerio.bozzolan triaged this task as Normal priority.
valerio.bozzolan created this object in space S1 Public.
valerio.bozzolan renamed this task from Config: understand how to avoid/simplify similar fatal: detected dubious ownership in repository at '/var/www/phorge' and similar to Fix/avoid/simplify similar fatal: detected dubious ownership in repository at '/var/www/phorge'.Apr 27 2023, 08:19

By the way it seems to me that this git security measure is completely nonsense for cases where the repository is highly-hardened and owned by root:root. I cannot imagine one single case where an user should not trust a git repository owned by root.

I ended up running this

git config --system --add safe.directory *

everything else didn't work