libgit2 / libgit2/libgit2sharp
LibGit2Sharp.LibGit2SharpException: certificate revocation status could not be verified
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 3.5k
- Forks
- 925
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Clone-Aufruf in Repository.cs und verfolge den zertifikatsbezogenen Fehler über Proxy.cs und Ensure.cs. Überprüfe anhand des gemeldeten Stacktraces und der Unternehmens-Firewall-Konfiguration als Reproduktionskontext, wie CloneOptions.FetchOptions.CertificateCheck bei diesem Fehler behandelt wird. Als erledigt gilt, festzustellen, ob die Bibliothek diesen Widerrufsfehler behandeln kann, und das unterstützte Verhalten zu dokumentieren oder zu testen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, git
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100