Clone from public Codeberg repository fails with authentication required
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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 ❤️
- 主要言語
- Go
- スター
- 178
- フォーク
- 25
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
containers/fetchit のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
containers/fetchit#429 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
containers/fetchit#242 ·
-
packaging the fetchit systemd services into RPM?再び着手できるかも @cooktheryan が 1557 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
containers/fetchit#218 · 担当者 1 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
containers/fetchit#216 · コメント 2 件 ·
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
containers/fetchit#210 ·
containers/fetchit の issue をすべて見る
似ている issue
-
Area/Agent Lifecycle Aspect/Build & Deploy Severity/Major Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
wso2/agent-manager#2603 ·
メンテナーはふだん 1 日以内に返信
-
[Enhancement] platform-engineer: a definition change does not re-render running Applications; say how to roll it out対応中かも @anoop2811 が今日担当しました。 オープンneeds-triage type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Area/Policies Aspect/API Severity/Major Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
wso2/api-platform#4468 ·
メンテナーはふだん 1 日以内に返信
-
review: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
1lck/Lithe-IDEA#2432 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
dsx-ai-factory/health-validation#368 ·
メンテナーはふだん 2 日以内に返信