Auto-cloning a Gitlab repo fails with "unable to update url base from redirection"
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- git, typescript
- Ambito
- developer-experience
Direzione di ricerca
Inizia con il plugin Backstage e il modulo git_clone indicato nel template; esamina prima l’issue #117 e la PR 210. Riproduci il problema con l’URL GitLab che termina in /-/blob/main/?ref_type=heads e confrontala con l’URL funzionante della root del repository. Il lavoro è completato quando il clonaggio automatico riesce con GitLab SAML SSO e il workspace corrisponde ancora all’entità Backstage.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- TypeScript
- Stelle
- 67
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/backstage-plugins
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
coder/backstage-plugins#105 · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
coder/backstage-plugins#148 ·
-
Coder plugin: Fallback authentication button still appears after user has already authenticated Apertabug
coder/backstage-plugins#146 · 1 assegnatario ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
coder/backstage-plugins#145 ·
-
bug
coder/backstage-plugins#142 · 7 commenti · 1 assegnatario ·
Tutte le issue di coder/backstage-plugins
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mksglu/context-mode#1200 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
AOSSIE-Org/DebateAI#582 · 2 commenti ·