libgit2 / libgit2/libgit2sharp
HTTP error 203 when pushing
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the reported call chain through Project/Controllers/upload/UploadController.cs:63, LibGit2Sharp.Core.Ensure.HandleError, Core.Proxy.git_remote_push, and Network.Push. Reproduce the same PAT-backed push on macOS and the Docker Linux agent using LibGit2Sharp 0.27.0-preview-0034, then identify why the environments return different HTTP statuses and verify pushing works consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, docker, git
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100