Auto-cloning a Gitlab repo fails with "unable to update url base from redirection"
まだ誰も着手していません。
評価
- 難易度
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/backstage-plugins のほかの issue
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
coder/backstage-plugins#105 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
coder/backstage-plugins#148 ·
-
Coder plugin: Fallback authentication button still appears after user has already authenticated オープン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時間 初心者へのやさしさ 84/100
bcgov/bc-wallet-mobile#4761 · コメント 1 件 ·
-
external-issue to-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100