What's the feeling on this one? If there's agreement in principle that git-clone should not fail when the current UID cannot be found in /etc/passwd then I'm happy to submit a patch to fix it. Thanks, Taylor On Wed, Dec 2, 2015 at 3:10 PM, Taylor Braun-Jones <taylor@xxxxxxxxxxxxxxx> wrote: > My use case it running git clone inside a docker container with > `docker run --user $(id -u):$(id -g) --volume /foo:/foo ...`. I want > all /foo/* file creation/access from inside the Docker container to be > done as the current uid/gid of the host system. > > Steps to reproduce: > > mkdir /tmp/docker-git > cat > /tmp/docker-git/Dockerfile <<EOF > FROM ubuntu > RUN apt-get update && apt-get install -y git-core > EOF > docker build -t git /tmp/docker-git/ > docker run --user $(id -u):$(id -g) git git clone > https://github.com/git/git.git /tmp/git > # fatal: unable to look up current user in the passwd file: no such user > echo $? # 128 > > My current workaround is: > > cat >> /tmp/docker-git/Dockerfile <<EOF > RUN git config --system user.name Docker && git config --system > user.email docker@localhost > EOF > > But I don't see why this should be necessary just to clone a repo. I > run complex build jobs inside a docker container using this approach > and git-clone is the first command to fail due to the lack of a passwd > file entry for the current user. Some complain to stderr, but still > succeed. > > Regards, > Taylor -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html