libgit2 / libgit2/libgit2sharp

HTTP error 203 when pushing

Offen
#1,942 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
C#
Sterne
3.5k
Forks
925
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie bei der gemeldeten Aufrufkette über Project/Controllers/upload/UploadController.cs:63, LibGit2Sharp.Core.Ensure.HandleError, Core.Proxy.git_remote_push und Network.Push. Reproduzieren Sie denselben PAT-basierten Push unter macOS und auf dem Docker-Linux-Agenten mit LibGit2Sharp 0.27.0-preview-0034, ermitteln Sie anschließend, warum die Umgebungen unterschiedliche HTTP-Statuscodes zurückgeben, und überprüfen Sie, dass das Pushen konsistent funktioniert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, docker, git
Bereich
backend, networking
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.