git
git copied to clipboard
fatal: detected dubious ownership in repository at '/git'
In a local git repo, I enter:
docker run -ti --rm -v ${HOME}:/root -v $(pwd):/git alpine/git status
and it gives me the following error:
docker run -ti --rm -v ${HOME}:/root -v $(pwd):/git alpine/git status
fatal: detected dubious ownership in repository at '/git'
To add an exception for this directory, call:
git config --global --add safe.directory /git
A proposed 'fix' is passing -u $UID:$GID
to the docker run
commands. It could be relevant to include this in the README.
suggested change in https://github.com/alpine-docker/git/pull/55
can't duplicate the issue now
$ docker run -ti --rm -v ${HOME}:/root -v $(pwd):/git alpine/git status
Digest: sha256:df3f712d8f82a4e6a408636dc52f1b52fc23e8f2d9f73a271a050961819daf95
Status: Downloaded newer image for alpine/git:latest
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean