docker-terragrunt icon indicating copy to clipboard operation
docker-terragrunt copied to clipboard

submodule clone breaks when using actions/checkout@v3 within the container

Open agyss opened this issue 1 year ago • 1 comments

:memo: Cloning submodule fails sometimes

Sometimes (most of the time, but not always - yes that's unlucky), I receive the following error in a substep of actions/checkout@v3

Fetching the repository
  /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +(removed commit ID)
  Error: fatal: unable to access 'myrepo': gnutls_handshake() failed: Error in the pull function.
  The process '/usr/bin/git' failed with exit code 128
  Waiting 20 seconds before trying again

The gha-runner looks like this:

...
    container: 
        image: devopsinfra/docker-terragrunt:azure-tf-1.6.1-tg-0.52.3
....
      - uses: actions/checkout@v3
        with:
            submodules: true
            token: ${{secrets.PAT_FOR_SUBMODULE}}
...

As Stackoverflow makes system setup responsible and also recommends the linked solution, I guess the issue is with the container and not checkout@v3. The link also shows a (potential) solution: https://stackoverflow.com/a/54178424/5785453

Expected would of course be that checkout with submodules works in the container.

:warning: Checklist

  • [x] Provided a clear and concise description of what the issue is.
  • [x] Given a clear and concise description of what is expected.
  • [x] Proposed a clear and concise description of any alternative solutions or other features.
  • [ ] Added any other context or screenshots about the feature request.
  • [ ] Associated pull request has been already created and link was provided.

Check CONTRIBUTING.md and CODE_OF_CONDUCT.md for more information

agyss avatar Oct 18 '23 10:10 agyss