libgit2 / libgit2/libgit2sharp
HTTP error 203 when pushing
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C#
- Star
- 3.5k
- Fork
- 925
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu từ chuỗi lệnh gọi được báo cáo qua Project/Controllers/upload/UploadController.cs:63, LibGit2Sharp.Core.Ensure.HandleError, Core.Proxy.git_remote_push và Network.Push. Tái hiện cùng một thao tác push dựa trên PAT trên macOS và agent Linux của Docker bằng LibGit2Sharp 0.27.0-preview-0034, sau đó xác định lý do các môi trường trả về các trạng thái HTTP khác nhau và xác minh rằng push hoạt động nhất quán.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp, docker, git
- Lĩnh vực
- backend, networking
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100