GitHub authentication produces the following error message: PKIX path building failed

Must-share information (formatted with Markdown):

  • which versions are you using: SonarQube Developer 2025.2.0.105476
  • how is SonarQube deployed: zip
  • what are you trying to achieve: Configure GitHub authentication and integration

Currently we are attempting to configure a SonarQube environment on a Windows Server. MS Sql is used for the database. To date we have installed the application and can login using the admin credentials. Where we are running into issues is configuring the GitHub authentication / integration portion. On the GitHub > Authentication tab under the Automatic user, group, and permission provisioning option the following error is displayed: ‘PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target’. We have added multiple certificates to the JAVA keystore with no luck. What certificates need to be added? Are the certificates event the issue or is this something else entirely? In addition under the GitHub Configuration area the following error is displayed: ‘Configuration is invalid.’ Is this due to the first error that I mentioned?

Hey there Timothy.

Sounds like the cert is the issue. You’ll need to make sure that the Java distribution running your SonarQube instance trusts the cert installed on your (I assume self-hosted?) GitHub instance.

This post might help you, along with these docs.

Our SonarQube installation is on-prem and our GitHub instance is in the cloud. Not sure if that makes a difference. what GitHub cert is the one required? The one from their site?

If your GitHub server is self-hosted (on-prem or in private cloud) and using a self-signed certificate, you’ll need to make sure the certificate installed on your GitHub server is in your JVM trust store. This can easily be obtained following the post I mentioned earlier (just substitute Gitlab with your GitHub server)

If you’re using GitHub.com, it would be strange for your JVM to not trust GitHub.com by default, since it uses a cert signed by trusted CAs. However, if that’s the case, it might point to another problem so don’t hesitate to clarify!

Which ones have you tried so far?