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

Allow to use self-hosted gitlab instances with own CA cert chain #869

Open
1 task done
bjoernricks opened this issue Sep 19, 2024 · 3 comments
Open
1 task done
Labels
good first issue Good for newcomers integration Related to remote integration

Comments

@bjoernricks
Copy link

Is there an existing issue for this?

  • 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 astral-sh/uv#2362

Steps To Reproduce

  1. Setup a GitLab instance with a self-signed CA
  2. Set GITLAB_REPO, GITLAB_TOKEN and GITLAB_API_URL environment variables
  3. 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

@bjoernricks bjoernricks added the integration Related to remote integration label Sep 19, 2024
Copy link

welcome bot commented Sep 19, 2024

Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️

@orhun orhun removed their assignment Sep 21, 2024
@orhun orhun added the good first issue Good for newcomers label Sep 21, 2024
@orhun
Copy link
Owner

orhun commented Sep 21, 2024

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.

@bjoernricks
Copy link
Author

Sorry missed your answer. Sadly I have no experience with ruff yet and therefore I don't think I can provide a good PR :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers integration Related to remote integration
Projects
None yet
Development

No branches or pull requests

2 participants