libgit2 / libgit2/libgit2sharp

LibGit2SharpException: could not find appropriate mechanism for credentials

Đang mở
#2,087 5 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ả

Reproduction steps

Upgraded from v0.26.2 to v0.30.0, had compilation issues. Fair enough, we were quite out of date.
We changed the credentials provider as this was now located in the FetchOptions (see #2065).
I even tried setting the ProxyOptions.ProxyType to None as that was now Auto by default.

Has there anything changed regarding credentials between those versions? I didn't immediately spotted something on the releases/changes page.

Expected behavior

Everything keeps working as normal.

Actual behavior

Exception is thrown when trying to clone a repository:
LibGit2Sharp.LibGit2SharpException: could not find appropriate mechanism for credentials at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 136 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 810

Version of LibGit2Sharp (release number or SHA1)

v0.30.0

Operating system(s) tested; .NET runtime tested

Windows 11
.NET Framework 4.8

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện lỗi clone trên Windows 11 với LibGit2Sharp v0.30.0 và so sánh thiết lập thông tin xác thực với v0.26.2, bắt đầu từ CloneOptions, FetchOptions và ProxyOptions. Kiểm tra các đường dẫn được nêu trong báo cáo trong Core/Ensure.cs, Core/Proxy.cs và Repository.cs, sau đó sử dụng #2065 và các thay đổi trong bản phát hành để xác định liệu hành vi của thông tin xác thực có thay đổi hay không và kết quả đã được sửa đúng sẽ như thế nào.

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
tooling
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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.