Use quiet git clone to avoid leaking OAuth tokens when cloning submodules
The arkindex_tasks.git.clone_repository
function should include --quiet
in the clone command to avoid leaking GitLab OAuth tokens when the repository includes submodules.
When there are submodules, the git clone outputs one line per submodule that looks like this:
Submodule 'dan' (https://oauth2:[INSERT TOKEN HERE]@gitlab.com/teklia/dan.git) registered for path 'dan'
In real conditions, [INSERT TOKEN HERE]
contains the actual GitLab token. This doesn't look so good.
With the --quiet
option, git clone
does not show any progress information, but will still print errors, which is what matters most for debugging. You can check that it prints errors by cloning something that doesn't exist: git clone --quiet https://null
.