Closed ktasper closed 2 months ago
When running the following locally:
sudo -E make docker
I get the following error:
docker run --rm \ --user 0:0 \ --env TARGET_GOOS= \ --env TARGET_GOARCH= \ --volume /tmp/amazon-ecr-credential-helper:/go/src/github.com/awslabs/amazon-ecr-credential-helper \ sha256:23b97de4f34d4c956e315659157439acfae03f15977d45c57c0e797729064846 \ make build git rev-parse --short=7 HEAD > GITCOMMIT_SHA fatal: detected dubious ownership in repository at '/go/src/github.com/awslabs/amazon-ecr-credential-helper' To add an exception for this directory, call: git config --global --add safe.directory /go/src/github.com/awslabs/amazon-ecr-credential-helper make: *** [Makefile:95: GITCOMMIT_SHA] Error 128
However running this seems to "fix" this problem.
docker run --rm \ --user 0:0 \ --env TARGET_GOOS= \ --env TARGET_GOARCH= \ --volume /tmp/amazon-ecr-credential-helper:/go/src/github.com/awslabs/amazon-ecr-credential-helper \ sha256:23b97de4f34d4c956e315659157439acfae03f15977d45c57c0e797729064846 \ git config --global --add safe.directory /go/src/github.com/awslabs/amazon-ecr-credential-helper && make build
I have also verified this behaviour on a CICD system.
However I do not see any docs / issues demonstrating this behaviour and it seems incorrect.
Fix can be found here: https://github.com/awslabs/amazon-ecr-credential-helper/pull/802
Thanks for opening and looking into this. Closing as resolved.
When running the following locally:
I get the following error:
However running this seems to "fix" this problem.
I have also verified this behaviour on a CICD system.
However I do not see any docs / issues demonstrating this behaviour and it seems incorrect.