Clone from public Codeberg repository fails with authentication required
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 65/100
Hướng nghiên cứu
Start with the clone path in pkg/engine/fetchit.go, where git.CloneOptions.Auth is always set to githttp.BasicAuth, then check the same pattern in pkg/engine/mirrors.go. Reproduce by cloning the public Codeberg repo with no credentials configured. Done means an anonymous clone of a public repository succeeds, and clones with credentials still send them.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm experiencing an issue when Fetchit tries to clone a public repository hosted on Codeberg.
The repository is: https://codeberg.org/dunossauro/obs-pods
Fetchit returns the following error:
podman run --replace --name fetchit -v fetchit-volume:/opt -v "$HOME/.fetchit:/opt/mount" -v "/run/podman/podman.sock:/run/podman/podman.sock" --security-opt label=disable quay.io/fetchit/fetchit:latest
initializing fetchit
starting fetchit
2026-11-03T22:05:51.087Z INFO engine/fetchit.go:531 git clone https://codeberg.org/dunossauro/obs-pods main --recursive
2026-11-03T22:05:51.831Z INFO engine/fetchit.go:563 git clone failed: authentication required: Credentials are incorrect or have expired. Retry your command or see https://codeberg.org/forgejo/forgejo/issues/2809 for more information
My poor investigation (sorry, I don't know much about Go)
I tried to investigate the clone implementation in pkg/engine/fetchit.go.
The current implementation always initializes git.CloneOptions.Auth with githttp.BasicAuth, even when no username or password is configured.
I also created an isolated Go test using the exact same go-git version used by Fetchit: github.com/go-git/go-git/v5 v5.19.2
The following operation succeeds:
git.PlainClone(
"/tmp/obs-pods-gogit",
false,
&git.CloneOptions{
URL: "https://codeberg.org/dunossauro/obs-pods",
ReferenceName: plumbing.NewBranchReferenceName("main"),
SingleBranch: true,
},
)
Output: CLONE SUCCESS
No authentication is required. I also confirmed that the repository has no .gitmodules file, so submodules are not involved.
Suspected cause
Fetchit unconditionally configures HTTP Basic Authentication, even when credentials are empty.
Could this be causing Codeberg/Forgejo to reject the anonymous clone request?
Would it make sense to configure CloneOptions.Auth only when credentials are actually provided?
The same behavior should also be reviewed in pkg/engine/mirrors.go.
Environment
- Fetchit image: quay.io/fetchit/fetchit:latest
- Go dependency: go-git v5.19.2
- Repository host: Codeberg / Forgejo
- Repository visibility: Public
- Authentication: None intended
Really thanks for this amazing project ❤️
- Ngôn ngữ chính
- Go
- Star
- 178
- Fork
- 25
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
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 containers/fetchit
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
containers/fetchit#429 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
containers/fetchit#242 ·
-
packaging the fetchit systemd services into RPM?Có thể làm lại được @cooktheryan đã nhận 1557 ngày trước và không có pull request nào đang mở. Đang mở
containers/fetchit#218 · 1 người được giao ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
containers/fetchit#216 · 2 bình luận ·
-
Modify Disconnected formatĐang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
containers/fetchit#210 ·
Tất cả issue của containers/fetchit
Issue tương tự
-
Area/Agent Lifecycle Aspect/Build & Deploy Severity/Major Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
wso2/agent-manager#2603 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Enhancement] platform-engineer: a definition change does not re-render running Applications; say how to roll it outCó thể đã có người làm @anoop2811 đã nhận hôm nay. Đang mởneeds-triage type/enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Area/Policies Aspect/API Severity/Major Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
wso2/api-platform#4468 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
review: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
1lck/Lithe-IDEA#2432 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
dsx-ai-factory/health-validation#368 ·
Maintainer thường phản hồi trong vòng 2 ngày