Sonarqube Integration with Github

Hi Team,

When I tried setting up Github Integration with Sonarqube , we have Installed github app as per the docs and when we are configuring the same in sonarqube Alm integrations by giving all details such as Client ip , secret and private key , It is giving an error saying Invalid URL , May I know why Is the Issue here .

Before Jumping into the solution , Actually as of now we are hosting sonarqube on AWS ec2 and accessing the dashboard using Internal load balancer which can access only in Client network and are using HTTP version , But during the configuration in our docs It is saying use HTTPS protocol.

Is the Issue here is using HTTP protocol ?? Do we need to use HTTPS protocol compulsory as per docs ? Is It Mandatory to host sonarqube and access using HTTPS version instead of HTTP version for github Integration

For security reasons, make sure you’re using HTTPS protocol for your URLs in your app.
https://docs.sonarqube.org/latest/analysis/github-integration/

Hi Team,

Any Inputs on the above issue will be highly appreciate , Can you please let me know regarding this ? Is HTTPS mandatory for sonarqube dashboard regarding github and sonarqube Integration , Currently I am facing Issue in step 3 (GitHub Integration | SonarQube Docs) , It is saying “Failed to validate configuration, check URL and private key”.

Can you please let me know regarding the Issue ?

Hi Team,

Any Inputs on this will be highly appreciated , Can you please confirm on the above details and the Issue that I am facing regarding Github and sonarqube Integration.

Hi Team,

Can you please confirm the above steps which I have mentioned regarding sonarqube Github Integration , Unfortunately this is my fourth message on this and yet awaiting your reply on this . Can you please confirm whether Https is mandatory for sonarqube dashboard url to have the Github Integration for pull request decoration as mentioned above as I am facing an Issue.

Hello @vinodkumar4b9 ,

In order to investigate your issue I will need couple of information:

  • SQ version you use
  • Are you trying to integrate with GitHub Enterprise or github.com?

As a side note, validation in ALM settings does not have a restriction for http or https.

The message you are pointing to: Failed to validate configuration, check URL and private key should also log an exception thrown by client to a log, could you share that?

Hi Jacek,

Thanks for your Inputs on this , please find the details below

SQ version we are using is 8.6.0.39681 (As of now we are using trial version of Enterprise sonarqube)

I am trying to Integrate with github enterprise , url i have confgured is github.company.com/api/v3 , When I checked the logs It was giving me below error

javax.net.ssl.SSL handshake exception , PKIX path building failed and unable to find valid certification path for requested target ,

Can you please help us here ? and please let me know if you need any additional details.

Does your GHE instance use HTTPS? The error you are showing is typical when java client tries to send request to https url, is your GHE behind proxy?

Hi Jacek,

Yes our GHE is using HTTPS and It will accessible only with in the Internal Network of our client location , we cant access that out of Client network . And even our Sonarqube server which we hosted on AWS ec2 will be only accessible on Internal network using Internal load balancer only.

is there any SSL thing that I need to setup on my Sonarqube server to get the connectivity Issue resolved?

Hi, this indicates that your SSL certificate is not complete. You may lack the full path (meaning that your certificate file does not contain the chain up to the root certificate), and/or that the domain used is not explicitly listed in the certificate. Make sure you added the correct hostname to your certificate Server Name Indication extension.

Hi Pierre,

Thank you so much for the details on this , I guess we are missing some settings regarding the SSL part , I will check and try this settings and will reach out to you for any additional help on this.

Thanks for your time on this.

Hi Pierre,

Any Idea how We can resolve this Issue , What needs to be done to resolve the above issue . is this some thing that can be resolved if we use https url for sonarqube server?

Can you please guide us here ?

Hi @pierreguillot ,

Thanks for your comments on this , I am able to fix the issue . But I have a doubt here regarding the pull request decoration when we have tested that It is working fine but in github enterprise in the checks and status tab , It is giving values correctly but it showing the broken Images.

May I know why is that ? I heard that It is an ongoing issue from Sonarqube side . Can you please let me know what is the resolution for this ??

By the way both our Sonarqube setup and GitHub Enterprise are Internal and will only be accessible in VDI.

Hi, when you hover your mouse on theses broken images, is the link pointing correctly to your SonarQube instance URL? If not, you can fix that in your SonarQube admin settings, edit your Server base URL

Hi @pierreguillot ,

Actually It is not pointing to the sonarqube instance url, I have updated the same as you specified , Still not updated .

Do i need to run the scan again for this to reflect the changes ??

A post was split to a new topic: .NET C# solution with some integration tests, but no unit tests. Can’t import code coverage…

is your issue resolved? Can you let me know the fix as I’m having same problem

Hey @Syed_Waleed_Asad

Instead of bumping this old thread, I would recommend creating a new topic detailing your issue (including versions, screenshots, logs).

I will close this thread.