cnoe-io / idpbuilder

Spin up a complete internal developer platform with only Docker required as a dependency.
https://cloud-native.slack.com/archives/C05TN9WFN5S
Apache License 2.0
200 stars 59 forks source link

initial ssh clone support #405

Open nabuskey opened 1 month ago

nabuskey commented 1 month ago

Related to: https://github.com/cnoe-io/idpbuilder/issues/385

This adds support for cloning private repositories by SSH.

Currently, when users want to use a private repository, they need to first clone the private repository, then run idpbuilder against the local copy. This allows them to specify a private repository with ssh clone format:

idpbuilder  create --recreate  --package git@github.com:nabuskey/stacks-private//basic/package2

Currently only SSH Key authentication without password is supported.

I am not sure about introducing something like this because:

  1. This adds complexity and cannot possibly account for different SSH configurations. e.g. trying all valid ssh keys, accounting for passwords, etc.
  2. There's already a valid workaround. Cloning a private repo with way more reliable git clone command.
  3. In the future, it may introduce support for http auth which becomes even more complex.