Allow to use self-hosted gitlab instances with own CA cert chain
Is there an existing issue for this?
- [X] I have searched the existing issues
Description of the bug
Hi,
currently it's not possible to use git-cliff with a self-hosted GitLab instance that uses an own CA for example with self-signed certificates.
A possible solution would be to use the rustls-tls-native-roots feature instead of rustls-tls for reqwest or provide a similar CLI argument like uv in https://github.com/astral-sh/uv/pull/2362
Steps To Reproduce
- Setup a GitLab instance with a self-signed CA
- Set GITLAB_REPO, GITLAB_TOKEN and GITLAB_API_URL environment variables
- Run git-cliff
Expected behavior
git-cliff can request information from a self-hosted GitLab instance using an own CA cert chain
Screenshots / Logs
WARN git_cliff_core::changelog > You are using an experimental feature! Please report bugs at <https://git-cliff.org/issues>
ERROR git_cliff_core::changelog > Failed to lookup project! HTTP client with middleware error: `Middleware error: Request error: error sending request for url (https://xxx/api/v4/projects/xxx)`
thread 'main' panicked at git-cliff-core/src/changelog.rs:452:18:
Could not get gitlab metadata: HttpClientMiddlewareError(Middleware(Request error: error sending request for url (https://xxx/api/v4/projects/xxx)
Caused by:
0: error sending request for url (https://xxx/api/v4/projects/xxx)
1: client error (Connect)
2: invalid peer certificate: UnknownIssuer
Software information
- Operating system: Debian Linux
- Project version: 2.5.0 installed from PyPI
Additional context
No response
Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️
Hey, thanks for reporting!
The possible solution you recommended looks solid, would you be down to implement it? 🐻 I can also try it out but it would be easier if you already have an environment to test it out.
Sorry missed your answer. Sadly I have no experience with rust yet and therefore I don't think I can provide a good PR :-(
I am encountering the same issue. Any chance for this to be implemented soon?
Now implemented in #1021, it's going to be the part of the release that I'm planning to push tomorrow.
Testing it would be appreciated!