rust-lang / git2-rs

libgit2 bindings for Rust
https://docs.rs/git2
Apache License 2.0
1.69k stars 387 forks source link

self sign certificate #1029

Closed Masber closed 7 months ago

Masber commented 7 months ago

Dear git2-rs community,

I am building a cli that needs to communicate with a self hosted git server (gitea), I would like to be able to fetch repo info, the git repo is using a self sign certificate.

Currently, I am getting the following error:

called `Result::unwrap()` on an `Err` value: Error { code: -17, klass: 16, message: "the SSL certificate is invalid" }

How can I inject my cert into git2-rs to solve this issue?

thank you very much