Comments (12)
And I have already checked my system's ca-certificates
, it's up-to-date.
from libgit2sharp.
I don't have access to ARM64 hardware, so it's going to be tricky to figure out why this might be happening.
Is there a version of LibGit2Sharp that did work for you, or is this the first time you've tried it?
from libgit2sharp.
I don't have access to ARM64 hardware, so it's going to be tricky to figure out why this might be happening.
I've also tested it on Ubuntu-x64, and it's not working there either. But add an env var could help this:
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
Is there a version of LibGit2Sharp that did work for you, or is this the first time you've tried it?
I'm not sure if there is a version that suits me. Is it possible for LibGit2Sharp to add a feature allowing users to use their local certificates?
from libgit2sharp.
What repo are you trying to clone? Does it not have a certificate that should be trusted?
Is it possible for LibGit2Sharp to add a feature allowing users to use their local certificates?
If you look at the FetchOptions
in the CloneOptions
, you'll see that there is a CertificateCheck
delegate, which lets you control certificate validation.
from libgit2sharp.
What repo are you trying to clone? Does it not have a certificate that should be trusted?
The repo is https://git.cinogama.net/cinogamaproject/woolang
It's validate, subject=CN = git.cinogama.net issuer=C = CN, O = "TrustAsia Technologies, Inc.", CN = TrustAsia RSA DV TLS CA G2
If you look at the
FetchOptions
in theCloneOptions
, you'll see that there is aCertificateCheck
delegate, which lets you control certificate validation.
Okay, I will check it, thanks!
from libgit2sharp.
I just tried cloning that repo on Windows and Ubuntu 22.04 via WSL (x64 for both) and everything is working fine for me.
from libgit2sharp.
So it might be a problem with my configuration...
var repoGitPath = Repository.Clone("https://git.cinogama.net/cinogamaproject/woolang.git", CachePath,
new CloneOptions
{
BranchName = "release",
Checkout = true,
RecurseSubmodules = true,
OnProgress = ProgressEvent
});
from libgit2sharp.
Then this might be a problem with the ARM version of the system.
from libgit2sharp.
So it might be a problem with my configuration...
var repoGitPath = Repository.Clone("https://git.cinogama.net/cinogamaproject/woolang.git", CachePath, new CloneOptions { BranchName = "release", Checkout = true, RecurseSubmodules = true, OnProgress = ProgressEvent });
Go ahead and try the FetchOptions.CertificateCheck
that I mentioned. That should let you return true
and make the https connection even if the system doesn't trust the certificate for whatever reason.
from libgit2sharp.
So it might be a problem with my configuration...
var repoGitPath = Repository.Clone("https://git.cinogama.net/cinogamaproject/woolang.git", CachePath, new CloneOptions { BranchName = "release", Checkout = true, RecurseSubmodules = true, OnProgress = ProgressEvent });Go ahead and try the
FetchOptions.CertificateCheck
that I mentioned. That should let you returntrue
and make the https connection even if the system doesn't trust the certificate for whatever reason.
var repoGitPath = Repository.Clone("https://git.cinogama.net/cinogamaproject/woolang.git", CachePath,
new CloneOptions
{
BranchName = "release",
Checkout = true,
RecurseSubmodules = true,
OnProgress = ProgressEvent,
FetchOptions = new FetchOptions
{
CertificateCheck = (_, _, _) => true
}
});
But if I skipped the local SSL certs check, would doing this lead to security issues?
from libgit2sharp.
But if I skipped the local SSL certs check, would doing this lead to security issues?
That's not really a question I can answer. It depends entirely on your use case. If you're only ever cloning that one repo, for example, and you trust the certificate, then it doesn't really matter if the system you're running it on can validate it or not.
On the other hand, if you're writing a tool that others can use to connect to any arbitrary URL, then you're losing any sort of verification that the user is talking to the site they think they are connecting to.
The certificate check handler does pass in the certificate in question, so you could always write logic that looks at the certificate and validates it against a list certificates manually maintained by you.
Have you tried cloning any other repos? For example, what about a repo from GitHub? I'd be curious to see if you have the same problem with other sites.
from libgit2sharp.
Have you tried cloning any other repos? For example, what about a repo from GitHub? I'd be curious to see if you have the same problem with other sites.
Well, it should be system's problem:
from libgit2sharp.
Related Issues (20)
- Unable to clone git repo while using this library. HOT 9
- `LibGit2SharpException` when cloning repository within a Docker container HOT 9
- Getting exception "too many redirects or authentication replays" HOT 2
- ObjectDatabase.Write<T>(Stream stream...) overload does not respect T
- .NET Standard support? HOT 4
- Unable to push to Azure DevOps repository when project name contains space HOT 1
- CloneOptions does not contains a definition of CredentialsProvider,,, HOT 13
- Performance regression when reading files from the tree in parallel HOT 6
- Security: Update to libgit2 1.7.2 HOT 3
- unexpected EOF when trying to fetch from remote
- Please consider adding AOT support for .Diff.Compare<T>() HOT 19
- How to checkout a specific folder from repository?
- LibGit2SharpException: could not find appropriate mechanism for credentials HOT 5
- FetchOptions in CloneOptions is readonly and has not been set in constructor !
- Git Fetch fails with could not decrypt tls message when TLS 1.3 is allowed
- git 2.40.0 index.skipHash incompatible with libgit2sharp (please update libgit2 from 1.7.1 to 1.8.0)
- the command pull take the class Repository instead of the interface like other commands
- Security Vulnerabilities in git2-106a5f2.dll: Non-Compliance with Secure Hashing and Compiler Security Best Practices HOT 2
- Request - upgrade to libgit2 1.7.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgit2sharp.