libgit2 / libgit2/libgit2sharp

HTTP error 203 when pushing

Aperta
#1,942 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C#
Stelle
3.5k
Fork
925
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla catena di chiamate segnalata attraverso Project/Controllers/upload/UploadController.cs:63, LibGit2Sharp.Core.Ensure.HandleError, Core.Proxy.git_remote_push e Network.Push. Riproduci lo stesso push basato su PAT su macOS e sull’agente Linux Docker usando LibGit2Sharp 0.27.0-preview-0034, quindi identifica perché gli ambienti restituiscono codici di stato HTTP diversi e verifica che il push funzioni in modo coerente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, docker, git
Ambito
backend, networking
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.