libgit2 / libgit2/libgit2sharp
Git clone causes an "SSL error: syscall failure:" with a specific repo
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ả
We are going to have to dump this library for this issue and move to using the cli instead. I figured I'd report this issue so maybe in the future someone can get around to fixing it. The issues has been reported before and have been open for over 4 years.
With a specific private repo, this error happens only on Alpine Linux in a container running as an ACA Job in Azure.
Authentication is being used (Personal Access Token) with the user of "default"
"[Message] SSL error: syscall failure: "
No other logging or error message.
Reproduction steps
This is extremely difficult to reproduce. I don't even know what it is about this specific repo that is causing the problem as other, repos owned by the same company using the same token, clone fine.
If I run locally in docker desktop, it does not crash. Everything else being equal.
I see others have reported the same issue and the bug has been open for years.
https://github.com/libgit2/libgit2sharp/issues/1262
Running the same user/token and URL from the cli git client works without issues.
git clone https:{user}:{token}@github.com/path/to/repo
I'm doing some digging to see if I can get more info about why it's happening.
I was able to get a detailed stacktrace from the service.
[Exception]: [07/31/2024 23:56:31]: (/_/LibGit2Sharp/Core/Ensure.cs):(154)
[Exception]: [07/31/2024 23:56:31]: (/_/LibGit2Sharp/Core/Ensure.cs):(172)
[Exception]: [07/31/2024 23:56:31]: (/_/LibGit2Sharp/Core/Proxy.cs):(278)
[Exception]: [07/31/2024 23:56:31]: (/_/LibGit2Sharp/Repository.cs):(824)
at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts) in //LibGit2Sharp/Core/Proxy.cs:line 278
at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) in //LibGit2Sharp/Repository.cs:line 824
Here is some feedback. The logging isn't very good in this function that's checking the response code from the code repository. If we could see the code that is being returned (and it doesn't seem to the HTTP OK) then we would have a better understanding about what the issue is.
This morning (8/1/2024) I implemented a cli version of git and it had no issues cloning from the ACA Job on the specific repo.
Expected behavior
The repo clones
Actual behavior
The library crashes
Version of LibGit2Sharp (release number or SHA1)
0.30
Operating system(s) tested; .NET runtime tested
Alpine Linux .NET 8.0
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 với đường dẫn clone bị lỗi trong Core/Proxy.cs:278 và Repository.cs:824, sau đó kiểm tra các bước kiểm tra lỗi trong Core/Ensure.cs:154 và :172. Nếu có thể, hãy tái hiện lỗi trên Alpine Linux với .NET 8 bằng cách sử dụng repository riêng tư và cấu hình xác thực đã được báo cáo. Hoàn thành khi xác định được nguyên nhân và khiến việc clone thành công, hoặc báo cáo một lỗi có tính hành động cao hơ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, git
- Lĩnh vực
- devtools
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- 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
- 25/100