/usr/bin/pull fails: "fatal: detected dubious ownership" #290

Open
opened 2023-10-23 22:04:14 +00:00 by hactar · 1 comment
hactar commented 2023-10-23 22:04:14 +00:00 (Migrated from github.com)

I try to run the command sudo docker exec -t -i containername /usr/bin/pull from the :latest image.

When I do I get an error:

fatal: detected dubious ownership in repository at '/var/www/html'
To add an exception for this directory, call:

	git config --global --add safe.directory /var/www/html

Checking the permissions they are:

f34e727608f2:/var/www/html# ls -lah
total 204K   
drwxr-xr-x    1 nginx    nginx       4.0K Oct 23 21:58 .
drwxr-xr-x    1 root     root        4.0K Jun 10 19:59 ..
drwxr-xr-x    8 nginx    nginx       4.0K Oct 23 21:58 .git

The container does not have any volume attached.

I try to run the command `sudo docker exec -t -i containername /usr/bin/pull` from the :latest image. When I do I get an error: ``` fatal: detected dubious ownership in repository at '/var/www/html' To add an exception for this directory, call: git config --global --add safe.directory /var/www/html ``` Checking the permissions they are: ``` f34e727608f2:/var/www/html# ls -lah total 204K drwxr-xr-x 1 nginx nginx 4.0K Oct 23 21:58 . drwxr-xr-x 1 root root 4.0K Jun 10 19:59 .. drwxr-xr-x 8 nginx nginx 4.0K Oct 23 21:58 .git ``` The container does not have any volume attached.
rahulmr commented 2024-01-10 03:47:35 +00:00 (Migrated from github.com)

Encountered same issue, please fix if possible.

Encountered same issue, please fix if possible.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ric/nginx-php-fpm#290
No description provided.