Ensure FF_USE_GIT_NATIVE_CLONE works with FF_GIT_URLS_WITHOUT_TOKENS
Summary
In !5010 (merged) FF_USE_GIT_NATIVE_CLONE
was introduced. This does not support FF_GIT_URLS_WITHOUT_TOKENS
. It needs to be supported.
Steps to reproduce
- run a job with
FF_USE_GIT_NATIVE_CLONE : true
FF_GIT_URLS_WITHOUT_TOKENS : true
- for a private repo
- with git >= 2.49
Actual behavior
Puling the repo fails.
The clone URL does not have creds embeded, however the git cred helper is not setup.
Expected behavior
The clone should "just work".
Relevant logs and/or screenshots
I observed this solely based on the code changes, and while working on switching FF_GIT_URLS_WITHOUT_TOKENS
to true by default (!5525 (merged)).
Environment description
-
Used GitLab Runner version
-
Possible fixes
- Ensure the cred helper is set up also for
FF_USE_GIT_NATIVE_CLONE
/writeCloneRevisionCmd(...)
- Ensure we have coverage for this case