libgit2 / libgit2/libgit2sharp

HTTP error 203 when pushing

Abierto
#1,942 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
C#
Estrellas
3.5k
Forks
925
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

You are opening a bug report against the LibGit2Sharp project: we
use GitHub Issues for tracking bug reports and feature requests. If
you have a question about an API or usage, please ask on StackOverflow:
http://stackoverflow.com/questions/tagged/libgit2sharp.

Otherwise, to report a bug, please fill out the reproduction steps
(below) and delete these introductory paragraphs. Thanks!

Reproduction steps

I have a docker machine that is supposed to push some files. I am using a PAT to push to the private repo. When I try this locally it works. But on the docker machine I get this error:

LibGit2Sharp.LibGit2SharpException: unexpected HTTP status code: 403
\n at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
\n at LibGit2Sharp.Core.Proxy.git_remote_push(RemoteHandle remote, IEnumerable1 refSpecs, GitPushOptions opts)\n at LibGit2Sharp.Network.Push(Remote remote, IEnumerable1 pushRefSpecs, PushOptions pushOptions)
\n at Project.Controllers.upload.UploadController.Upload(String id) in /src/Project/src/Project/Controllers/upload/UploadController.cs:line 63

Expected behavior

Expected behavior is for this to work on both local and docker machines

Actual behavior

It only works locally

Version of LibGit2Sharp (release number or SHA1)

I tried a couple versions. All gave the same result. Now I am on 0.27.0-preview-0034

Operating system(s) tested; .NET runtime tested

MacOS working fine. Docker linux agent does not

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza por la cadena de llamadas reportada a través de Project/Controllers/upload/UploadController.cs:63, LibGit2Sharp.Core.Ensure.HandleError, Core.Proxy.git_remote_push y Network.Push. Reproduce el mismo push respaldado por PAT en macOS y en el agente Linux de Docker usando LibGit2Sharp 0.27.0-preview-0034; después, identifica por qué los entornos devuelven distintos estados HTTP y verifica que el push funcione de forma consistente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp, docker, git
Área
backend, networking
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.