0

I am trying to checkout registry modules with terraform. I am using a terragrunt container and getting the following error when I use a module that is pulling from github.

 /usr/bin/git exited with 128: fatal: unsafe
│ repository ('/path/module' is owned by someone else)

I know this was indroduced due to git changes back in april. I am trying to get around this issue. I have tried adding User: 1000 to the docker compose which allows the checkout as its the same user as I am running on my WSL2. The issue is than the aws creds not mapping correctly.

version: '3'
services:
  terraform-utils:
    image: alpine/terragrunt:latest
    env_file: .env
    volumes:
      - .:/apps
      - $HOME/.aws:/root/.aws
    working_dir: /apps
clonerworks
  • 641
  • 1
  • 6
  • 16
  • On the Git side, you can (in an updated Git) use `safe.directory=*`. The asterisk may need quoting, e.g., `git -c safe.directory="*" ...` or `git config --add safe.directory "*"`. It's probably going to be much better if you can fix the uid mapping though, since without that you may hit many other permissions issues. – torek May 12 '22 at 07:24

0 Answers0