Open paulm-jones opened 1 month ago
Maybe because the git-clone module is not handling blob
? It seems to only handle tree
. I wonder if you could work around it like:
module "git_clone" {
url = replace(data.coder_parameter.repo_url.value, "/blob/", "/tree/")
}
Although, I am not familiar enough with GitLab to know if blob
and tree
are equivalent.
Background
My organisation is exploring Coder with the Backstage plugin and Gitlab.com (Gitlab SaaS, i.e. not self-hosted).
In Backstage, before creating anything, the plugin shows:
We see #117 and the fact a change was made, and also that a merge was made to the git clone module in PR 210, but we are yet to be able to make it work.
Challenge
With a template that auto-clones, for example using the
git_clone
module:We see the clone fail after redirection:
We enforce single sign-on, which may explain the saml/sso redirection.
Alternatives
If we do not "auto-clone", and instead try and clone from the Workspace template directly (providing "Git repository" in the GUI), providing "https://gitlab.com/myorg/myrepo", then it works.
The downside is that the Backstage plugin won't "match" the Workspace as being related to the Backstage entity (presumably because we omitted the
-/blob/main/?ref_type=heads
suffix).Has anyone been able to make this work with Gitlab yet please?