libgit2 / libgit2/libgit2sharp
LibGit2Sharp.LibGit2SharpException: certificate revocation status could not be verified
Personne n'a encore pris cette issue.
- Langage dominant
- C#
- Étoiles
- 3.5k
- Forks
- 925
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par l’appel de clonage dans Repository.cs et suivez l’erreur liée au certificat à travers Proxy.cs et Ensure.cs. Examinez la manière dont CloneOptions.FetchOptions.CertificateCheck est géré pour cet échec, en utilisant la stack trace signalée et la configuration du pare-feu d’entreprise comme contexte de reproduction. Le travail est considéré comme terminé lorsqu’il est établi si la bibliothèque peut gérer cette erreur de révocation et que le comportement pris en charge est documenté ou testé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp, git
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100