-
Notifications
You must be signed in to change notification settings - Fork 892
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
"LibGit2Sharp.LibGit2SharpException: could not initialize security context" while cloning #2108
Comments
What are you trying to clone from? GitHub.com? GHES? On prem azure devops? Hosted Azure DevOps? Something else? Does it have a valid SSL cert or is it self signed? What sort of auth mechanism is it trying to use? Basic? Kerberos? Something else? |
i am also facing the same error during git clone by using libgit2sharp version 0.30 |
@happy2ganesh Same questions if you can help: What are you trying to clone from? GitHub.com? GHES? On prem azure devops? Hosted Azure DevOps? Something else? Does it have a valid SSL cert or is it self signed? What sort of auth mechanism is it trying to use? Basic? Kerberos? Something else? |
@ethomson Another thing to mention is while testing it using "libgit2sharp-proxy-enabled" Version="0.0.0-preview.0.1901" |
@ethomson please find the requested details: |
@ethomson any update on it |
Reproduction steps
providing valid credential to the CredentialProvider using the below snippet
cloneOptions.FetchOptions.CredentialsProvider = (url, usernameFromUrl, password) =>
new UsernamePasswordCredentials{ Username = gitCredential.UserName, Password = gitCredential.Password };
cloneOptions.FetchOptions.CertificateCheck = (certificate, valid, host) => true;
Repository.Clone(Credential.RepositoryUrl, workingDirectory, cloneOptions);
Expected behavior
Should clone the repository to the working directory.
Actual behavior
LibGit2Sharp.LibGit2SharpException: could not initialize security context:
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 824
Version of LibGit2Sharp (release number or SHA1)
v0.30.0
Operating system(s) tested; .NET runtime tested
.NET8, windows OS
The text was updated successfully, but these errors were encountered: