We'd like to avoid hardcoding that choice in jsonnetfile.json for all our users. Currently, we have to choose either the https:// or git@ url when using jb install <uri> and then that is hardcoded for everyone.
In our corporate setup, our gitlab repos are not public, so we need either an HTTPS token or a ssh private key to access the repos. Developers prefer using ssh keys (and hence git@ urls), while our ArgoCD GitOps setup uses HTTPS tokens. Because we need ArgoCD support, we're forced to using https:// URLs in jsonnetfile.json.
Suggestion: Introduce --url-prefix that can be as-is, ssh or https. defaulting to as-is. All it does is replace the beginnings of the URLs if different from as-is.
I considered just modifying the jsonnetfile.json before handing it to ArgoCD, but while that will work for the top-level dependencies, it won't work for transitive dependencies, because I don't have access to their jsonnetfile.json files beforehand. So currently we're forced to use https:// urls in our jsonnetfile.json files, which is less than ideal.
Both github and gitlab offer the choice of downloading the same repo with one of:
https://github.com/jsonnet-bundler/jsonnet-bundler.git
git@github.com:jsonnet-bundler/jsonnet-bundler.git
(The URLs are totally similar for gitlab)
We'd like to avoid hardcoding that choice in
jsonnetfile.json
for all our users. Currently, we have to choose either thehttps://
orgit@
url when usingjb install <uri>
and then that is hardcoded for everyone.In our corporate setup, our gitlab repos are not public, so we need either an HTTPS token or a ssh private key to access the repos. Developers prefer using ssh keys (and hence
git@
urls), while our ArgoCD GitOps setup uses HTTPS tokens. Because we need ArgoCD support, we're forced to usinghttps://
URLs injsonnetfile.json
.Suggestion: Introduce
--url-prefix
that can beas-is
,ssh
orhttps
. defaulting toas-is
. All it does is replace the beginnings of the URLs if different fromas-is
.I considered just modifying the
jsonnetfile.json
before handing it to ArgoCD, but while that will work for the top-level dependencies, it won't work for transitive dependencies, because I don't have access to theirjsonnetfile.json
files beforehand. So currently we're forced to use https:// urls in ourjsonnetfile.json
files, which is less than ideal.