Auto-cloning a Gitlab repo fails with "unable to update url base from redirection"
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- git, typescript
调研方向
从模板中引用的 Backstage plugin 和 git_clone 模块开始;先查看 issue #117 和 PR 210。使用以 /-/blob/main/?ref_type=heads 结尾的 GitLab URL 重现,并将其与可正常工作的仓库根目录 URL 进行比较。当在 GitLab SAML SSO 下自动克隆成功,且 workspace 仍与 Backstage entity 一致时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
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:
No workspaces found for repo
https://gitlab.com/myorg/myrepo/-/blob/main/?ref_type=heads
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:
data "coder_parameter" "repo_url" {
name = "repo_url"
display_name = "Git repository"
}
module "git_clone" {
source = "registry.coder.com/modules/git-clone/coder"
version = "1.0.18"
agent_id = coder_agent.main.id
url = data.coder_parameter.repo_url.value
}
We see the clone fail after redirection:
Cloning https://gitlab.com/myorg/myrepo/-/blob/main/ to /home/coder/main...
Cloning into '/home/coder/main'...
fatal: unable to update url base from redirection:
asked for: https://gitlab.com/myorg/myrepo/-/blob/main/info/refs?service=git-upload-pack
redirect: https://gitlab.com/groups/myorg/-/saml/sso?redirect=%2Fmyorg%2Fmyrepo%2F-%2Fblob%2Fmain%2Finfo%2Frefs%3Fservice%3Dgit-upload-pack&token=<token>
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?
- 主要语言
- TypeScript
- 星标
- 67
- 派生
- 9
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
coder/backstage-plugins 的其他 Issue
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 62/100
coder/backstage-plugins#105 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
coder/backstage-plugins#148 ·
-
bug
coder/backstage-plugins#146 · 已指派 1 人 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 45/100
coder/backstage-plugins#145 ·
-
bug
coder/backstage-plugins#142 · 7 条评论 · 已指派 1 人 ·
查看 coder/backstage-plugins 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/claude-code#96687 ·
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
AOSSIE-Org/DebateAI#582 · 2 条评论 ·