Problem
Cloning a Git repository in IntelliJ IDEA fails with:
unable to access 'https://<host>/<path>.git/': SSL certificate problem: self-signed certificate in certificate chain
This is Git/libcurl error code 19 (self-signed certificate in certificate chain). It typically occurs when cloning from an internal or self-hosted Git server (for example, GitHub Enterprise, GitLab, or Bitbucket Server) whose TLS certificate is signed by an internal or self-signed certificate authority (CA), or when connecting through a corporate TLS-inspecting proxy (for example, Zscaler or Netskope) that re-signs outbound HTTPS traffic with its own root CA.
Cause
IntelliJ IDEA's Clone Repository action runs the command-line git executable installed on the machine to perform the actual clone. The certificate trust store configured in Settings | Tools | Server Certificates covers Gradle, Maven, remote deployment servers, and HTTPS web services/APIs, but does not cover the command-line Git tool, which relies on its own, separate certificate configuration.
As a result, adding a certificate only to IntelliJ IDEA's own Settings does not resolve this error — the certificate must be trusted at the Git or operating-system level.
Resolution
- Confirm the issue is not IDE-specific: open a terminal outside IntelliJ IDEA and run the same command, for example
git clone https://<host>/<path>.git. If the same error occurs there, this confirms a Git/OS-level configuration issue rather than something specific to the IDE. - Obtain the organization's internal root CA certificate file — the one the internal Git server's certificate is signed with — from the IT or security team.
- Configure Git to trust the certificate, using one of the following approaches:
- Point Git directly at the certificate file:
git config --global http.sslCAInfo "/path/to/corporate-ca.pem"(use forward slashes in the path, including on Windows). - Import the certificate into the operating system's certificate store, then configure Git to use that store instead of its own bundled CA list. On Windows: import the certificate into Trusted Root Certification Authorities (via
certmgr.msc), then rungit config --global http.sslBackend schannel.
- Point Git directly at the certificate file:
- Restart IntelliJ IDEA and retry the clone.
- If a certificate is already configured and the error persists, check for a conflicting or malformed existing entry:
git config --global --list. An incorrect path in an existinghttp.sslCAInfoentry can cause its own separate failure and needs to be removed before a correct value takes effect.
A common pitfall is adding the certificate only to IntelliJ IDEA's own Settings | Tools | Server Certificates store and expecting the Git clone to succeed — that store does not cover the command-line Git tool at all (see Cause above).
Comments
0 comments
Please sign in to leave a comment.