Fix "unable to get password from user" errors in shell executor

What does this MR do?

With !5912 (merged), GitLab Runner v18.6.0 configured Git with the include.path setting to store credentials for cloning the repository. However, this setting was only set upon a new clone; existing Git repositories on disk did not get this setting, so all clones with shell runners failed with unable to get password from user errors.

Fix this by always setting the include.path on existing repositories.

What's the best way to test this MR?

  1. With GitLab Runner v18.6.1 (or main) run a CI job with a shell executor.
  2. Check the .git/config. Remove the include.path section.
  3. Re-run the job. It should fail with unable to get password from user.
  4. On this branch it should work and append include.path to the end of .git/config.

What are the relevant issue numbers?

Relates to #39130 (closed)

Edited by Stan Hu

Merge request reports

Loading