Automatically re-try git clone on failure
With the change the gitlab runner will automatically re-try the initial git clone in case of failures.
This should prevent occasional failures such as (https://gitlab.com/octopus-code/octopus/-/jobs/7353617718)
Fetching changes...
Initialized empty Git repository in /scratch/cioctopu/static/7353617718/octopus-code/octopus/.git/
Created fresh repository.
fatal: early EOF
fatal: index-pack failed
Error encountered during job: exit status 1
Error encountered during job: Error executing run_exec: exit status 1
Relevant documentation: https://docs.gitlab.com/ee/ci/runners/configure_runners.html#job-stages-attempts