Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SSH Support for submodule
When submodules url are SSH (or relative to a main SSH url), it was only possible to clone them if the main repository was also cloned via SSH and with the same
private_key
. Otherwise it was not possible to clone the submodule via SSH.We use relative url for all our submodules to allows HTTPS and SSH cloning. Our Concourse instance works with SSH and every repository has it's how
private_key
.I expended upon the existing
submodule_credentials
parameter by adding a second optionnal structure for ssh private keys:Since adding multiple identities to anssh-agent
does not work with git, I implemented a retry mecanism where a short-livedssh-agent
is created and used to retry thegit submodule update ...
command. The short-livedssh-agent
processes are killed after use to ensure the ressource terminate correctly.Since adding multiple identities to an
ssh-agent
does not work with git, I implemented a mecanism where a single ssh-agent is re-initialised with a single identity for every submodule clone via ssh. Once the submodule has been cloned, the ssh-agent is again re-initialised with the main repo identity (if it exist).Linked issues