You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running darker in our GitLab CI, it fails with the following message:
ERROR:darker.git:fatal: detected dubious ownership in repository at '/builds/group/repo'
ERROR:darker.git:To add an exception for this directory, call:
ERROR:darker.git:
ERROR:darker.git: git config --global --add safe.directory /builds/group/repo
Environment (please complete the following information):
OS: Kubernetes, running inside the official Python container
Python version 3.10.13
Git version 2.39.2
Darker version 1.7.2
Black version 22.8.0
Additional context
What makes this strange is that git itself works without a problem after marking the directory as safe. Here’s the output of some debug commands i put into our darker job:
$ git --version
git version 2.39.2
$ cat $HOME/.gitconfig || echo "No config"
cat: /project/.gitconfig: No such file or directory
No config
$ git status || echo "bah"
fatal: detected dubious ownership in repository at '/builds/group/repo'
To add an exception for this directory, call:
git config --global --add safe.directory /builds/group/repo
bah
$ git config --global --add safe.directory /builds/group/repo
$ cat $HOME/.gitconfig || echo "No config"
[safe]
directory = /builds/group/repo
$ git status || echo "bah"
HEAD detached at af72d68b1
nothing to commit, working tree clean
$ poetry run darker --diff --revision origin/master... app data_tests tests
ERROR:darker.git:fatal: detected dubious ownership in repository at '/builds/group/repo'
ERROR:darker.git:To add an exception for this directory, call:
ERROR:darker.git:
ERROR:darker.git: git config --global --add safe.directory /builds/group/repo
The directory itself (/builds/group/repo) is owned by root and has permissions 0777. The whole CI process is running as user app (UID 1000).
The text was updated successfully, but these errors were encountered:
gergelypolonkai
changed the title
dubious ownership error in our CI
dubious ownership error in GitLab CI
Nov 8, 2023
Describe the bug
While running darker in our GitLab CI, it fails with the following message:
Environment (please complete the following information):
Additional context
What makes this strange is that
git
itself works without a problem after marking the directory as safe. Here’s the output of some debug commands i put into our darker job:The directory itself (
/builds/group/repo
) is owned by root and has permissions0777
. The whole CI process is running as userapp
(UID 1000).The text was updated successfully, but these errors were encountered: