unexpected EOF when trying to fetch from remote
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- csharp, git
- Lĩnh vực
- devtools, networking
Hướng nghiên cứu
Bắt đầu từ Commands.Fetch và FetchOptions, sau đó theo dõi cách yêu cầu fetch quảng bá các khả năng như multi_ack_detailed, side-band-64k và include-tag. So sánh điều này với yêu cầu OS Git đang hoạt động và xác định liệu LibGit2Sharp có cung cấp quyền kiểm soát các tùy chọn đó hay không; được coi là hoàn tất khi xác định được một cấu hình được hỗ trợ hoặc một điểm không tương thích giao thức có thể tái hiện với Bitbucket 7.21.4.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm having an issue with a remote repo hosted on a BitBucket v7.21.4. The clone command works just fine, but when I try to fetch a particular branch if fails with LibGit2Sharp.LibGit2SharpException: unexpected EOF.
The issue is constantly reproducible.
Reproduction steps
Example code:
using var repo = new Repository(repositoryPath);
var fetchOpts = new FetchOptions();
fetchOpts.CertificateCheck = (_,_,_) => true;
fetchOpts.CredentialsProvider = (_, _, _) => new UsernamePasswordCredentials() { Username = remoteUser, Password = remotePassword };
fetchOpts.Prune = true;
fetchOpts.TagFetchMode = TagFetchMode.None;
var remote = repo.Network.Remotes["origin"];
Commands.Fetch(repo, remote.Name, [$"+refs/heads/{remoteBranch}:refs/remotes/{remote.Name}/{remoteBranch}"], fetchOpts, null);
Expected behavior
Fetch to complete successfully.
Actual behavior
Unhandled exception. LibGit2Sharp.LibGit2SharpException: unexpected EOF
Below is the trace:
Debug: Sending POST request to https://<repourl>/scm/<proj>/<repo>.git/git-upload-pack
Trace: Sending request:
POST /scm/<proj>/<repo>.git/git-upload-pack HTTP/1.1
User-Agent: git/2.0 (libgit2 1.7.1)
Host: <host>
Accept: application/x-git-upload-pack-result
Content-Type: application/x-git-upload-pack-request
Content-Length: 1124
Authorization: Basic <auth>
Trace: Sending request:
0074want 3edd78a0fa98c3c2361088051ef762b8ae617a7c multi_ack_detailed side-band-64k include-tag thin-pack ofs-delta
00000032have 6bb975022c21ceb358e9686ec47f62f0df5ab76b
0032have 19339ffb0a1a4a31c1ed445155ff5a0819a90404
...
0032have 4fcfbe8283ab4d7df213d4aad49213e078579dd5
0000
Trace: Received:
Unhandled exception. LibGit2Sharp.LibGit2SharpException: unexpected EOF
Below is the the trace from the OS git client fetch from the same remote which works just fine:
$git fetch origin master
...
12:39:35.668070 pkt-line.c:80 packet: fetch> command=fetch
12:39:35.668091 pkt-line.c:80 packet: fetch> agent=git/2.39.2
12:39:35.668095 pkt-line.c:80 packet: fetch> 0001
12:39:35.668098 pkt-line.c:80 packet: fetch> thin-pack
12:39:35.668102 pkt-line.c:80 packet: fetch> ofs-delta
12:39:35.668108 pkt-line.c:80 packet: fetch> want 3edd78a0fa98c3c2361088051ef762b8ae617a7c
12:39:35.668119 pkt-line.c:80 packet: fetch> have 6bb975022c21ceb358e9686ec47f62f0df5ab76b
...
12:39:35.668678 pkt-line.c:80 packet: fetch> have 7bb74cc0c823352f64704ffcf72a1449d7fa355d
12:39:35.668683 pkt-line.c:80 packet: fetch> 0000
I noticed that it sends only thin-pack and ofs-delta arguments as opposed to multi_ack_detailed side-band-64k include-tag thin-pack ofs-delta from libgit2sharp.
Is there a way to control this behavior with code?
Version of LibGit2Sharp (release number or SHA1)
Libgit2sharp v0.29.0
Operating system(s) tested; .NET runtime tested
.NET SDK:
Version: 8.0.101
Commit: 6eceda187b
Workload version: 8.0.100-manifests.69afb982
Runtime Environment:
OS Name: Mac OS X
OS Version: 14.3
OS Platform: Darwin
RID: osx-x64
- 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
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.
Issue khác của libgit2/libgit2sharp
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
libgit2/libgit2sharp#2193 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
libgit2/libgit2sharp#2192 · 1 bình luận ·
-
Website is down Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
libgit2/libgit2sharp#2191 · 2 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
libgit2/libgit2sharp#2189 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
libgit2/libgit2sharp#2187 · 2 bình luận ·
Tất cả issue của libgit2/libgit2sharp
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
azurenoops/spin_agent#975 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SubtitleEdit/subtitleedit#15108 · 1 bình luận ·