Clone from public Codeberg repository fails with authentication required
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 65/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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 ❤️
- Lenguaje dominante
- Go
- Estrellas
- 178
- Forks
- 25
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 2
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de containers/fetchit
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
containers/fetchit#429 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
containers/fetchit#242 ·
-
packaging the fetchit systemd services into RPM?Quizá libre de nuevo @cooktheryan la tomó hace 1557 días y no hay ningún pull request abierto. Abierto
containers/fetchit#218 · 1 asignado ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
containers/fetchit#216 · 2 comentarios ·
-
Modify Disconnected formatAbiertoenhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
containers/fetchit#210 ·
Todos los issues de containers/fetchit
Issues similares
-
Area/Agent Lifecycle Aspect/Build & Deploy Severity/Major Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
wso2/agent-manager#2603 ·
Los mantenedores suelen responder en 1 día
-
[Enhancement] platform-engineer: a definition change does not re-render running Applications; say how to roll it outPosiblemente ocupada @anoop2811 la tomó hoy. Abiertoneeds-triage type/enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Area/Policies Aspect/API Severity/Major Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
wso2/api-platform#4468 ·
Los mantenedores suelen responder en 1 día
-
review: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
1lck/Lithe-IDEA#2432 ·
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
dsx-ai-factory/health-validation#368 ·
Los mantenedores suelen responder en 2 días