Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable SSL Certificate Check: 'unknown certificate lookup failure: 33' #2106

Open
JialiWu7 opened this issue Jun 18, 2024 · 0 comments
Open

Comments

@JialiWu7
Copy link

JialiWu7 commented Jun 18, 2024

I want to disable certificate verification when cloning a repo from GitLab.

The code I am using is:

var options = new CloneOptions();
options.FetchOptions.CredentialsProvider = (_url, _user, _cred) 
    => new UsernamePasswordCredentials 
    { 
        Username = "user", 
        Password = "token"
    };
options.FetchOptions.CertificateCheck += delegate (Certificate certificate, bool valid, string host)
{
    return true;
};
Repository.Clone(cloneUrl, cloneDirectoryPath, options);

But I got this error when cloning:
unknown certificate lookup failure: 33

Version of LibGit2Sharp (release number or SHA1)

v0.30.0

Operating system(s) tested; .NET runtime tested

Windows 10
C# net8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant