Auto-cloning a Gitlab repo fails with "unable to update url base from redirection"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- git, typescript
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
Bắt đầu với plugin Backstage và module git_clone được tham chiếu trong template; trước tiên hãy xem lại issue #117 và PR 210. Tái hiện bằng URL GitLab kết thúc bằng /-/blob/main/?ref_type=heads và so sánh với URL thư mục gốc của repository đang hoạt động. Hoàn tất khi tự động clone thành công với GitLab SAML SSO và workspace vẫn khớp với Backstage entity.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- TypeScript
- Star
- 67
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/backstage-plugins
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
coder/backstage-plugins#105 · 1 reaction ·
-
Update backstage dependencies Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
coder/backstage-plugins#148 ·
-
Coder plugin: Fallback authentication button still appears after user has already authenticated Đang mởbug
coder/backstage-plugins#146 · 1 người được giao ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
coder/backstage-plugins#145 ·
-
bug
coder/backstage-plugins#142 · 7 bình luận · 1 người được giao ·
Tất cả issue của coder/backstage-plugins
Issue tương tự
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Mend: dependency security vulnerability untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100