Problem configuring SonarQube to connect Enterprise GitHub with self-signed-certificate


I’m trying to get my SonarQube server decorate PRs of my GitHub Enterprise instance, and getting an error, apparently related to my github using a self signed certificate:

2019.07.28 14:17:47 ERROR ce[AWw48biGb_3ypyi12UhK][c.s.C.A.C.A.A.C] Failed to request /repos/\<my org>/\<my repo>/installation Hostname \<my hostname> not verified:
    certificate: sha256/U9/\<...>
    DN: EMAILADDRESS=\<...>, CN=\<my hostname>, OU=\<...>, O=\<...>, L=Tel Aviv, ST=Israel, C=IL
    subjectAltNames: [  ]
        at okhttp3.internal.connection.RealConnection.connectTls(
        at okhttp3.internal.connection.RealConnection.establishProtocol(
        at okhttp3.internal.connection.RealConnection.connect(
        at okhttp3.internal.connection.ExchangeFinder.findConnection(
        at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(
        at okhttp3.internal.connection.ExchangeFinder.find(
        at okhttp3.internal.connection.Transmitter.newExchange(
        at okhttp3.internal.connection.ConnectInterceptor.intercept(
        at okhttp3.internal.http.RealInterceptorChain.proceed(
        at okhttp3.internal.http.RealInterceptorChain.proceed(
        at okhttp3.internal.cache.CacheInterceptor.intercept(
        at okhttp3.internal.http.RealInterceptorChain.proceed(
        at okhttp3.internal.http.RealInterceptorChain.proceed(
        at okhttp3.internal.http.BridgeInterceptor.intercept(
        at okhttp3.internal.http.RealInterceptorChain.proceed(
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(
        at okhttp3.internal.http.RealInterceptorChain.proceed(
        at okhttp3.internal.http.RealInterceptorChain.proceed(
        at okhttp3.RealCall.getResponseWithInterceptorChain(
        at okhttp3.RealCall.execute(

(stacktrace slightly obfuscated to remove private data)

I’ve tried adding the certificate to SonarQube’s JDK level or to my RHEL instance level, but it does not seems to work.
Googling around seems to suggest that OkHttp requires code level adjustments in order to support self signed certificates (code changes that I cannot do as the relevant code is invoked by SonarQube).

I’m running SonarQube Developer Edition, Version 7.9.1 (build 27448)

any suggestions?


This error usually occurs (in many circumstances where communication over SSL is taking place) when the hostname is not listed in the subjectAltNames of the certificate.

If you’re interested, you can check out this okhttp commit for some more details. okhttp is the library SonarQube is using.


I can confirm that was indeed the issue. thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.