libgit2 / libgit2/libgit2sharp

LibGit2Sharp.LibGit2SharpException: certificate revocation status could not be verified

Đang mở
#2,168 0 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ả

Hello

I am like many behind a corporate firewall for outbound access.
I am using LibGit2Sharp as a dependency of another tool Aspire.PolyRepo.

I am getting this error:

Unhandled exception. LibGit2Sharp.LibGit2SharpException: certificate revocation status could not be verified
   at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 154
   at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 172
   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 823

I have tried:
git config --global http.sslVerify false

I have as well put the callback for certificate check during clone operations like this:

var co = new CloneOptions();
co.FetchOptions.CertificateCheck += delegate (Certificate certificate, bool valid, string host)
{
    return true;
};

Claude AI was proposing other things like the following to get this to work:

// Set multiple environment variables to bypass SSL verification
Environment.SetEnvironmentVariable("GIT_SSL_NO_VERIFY", "1");
Environment.SetEnvironmentVariable("GIT_SSL_CAINFO", "");
Environment.SetEnvironmentVariable("GIT_CURL_VERBOSE", "1");

// Disable certificate validation globally for .NET HttpClient
ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true;
ServicePointManager.CheckCertificateRevocationList = false;

Is there anything else I can try to get this great library to function ?

Thanks

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

Bắt đầu với lệnh gọi clone trong Repository.cs và theo dõi lỗi liên quan đến chứng chỉ qua Proxy.cs và Ensure.cs. Xem xét cách CloneOptions.FetchOptions.CertificateCheck được xử lý đối với lỗi này, sử dụng stack trace được báo cáo và cấu hình tường lửa doanh nghiệp làm ngữ cảnh tái hiện. Hoàn thành nghĩa là xác định liệu thư viện có thể xử lý lỗi thu hồi này hay không, đồng thời lập tài liệu hoặc kiểm thử hành vi được hỗ trợ.

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
35/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.