Integrating Internal Community Sonarqube with github

Hi,

I’m looking at integrating sonarqube with github.com. The sonarqube is community edition and resides in internal network. Can the ALM integration work with this setup, having the sonarqube on internal network integrating to github.com repositories?

Thanks.

Hi @Chew_Thiam_Soon ,

Yes, even with Community Edition, you will be able to integrate with GitHub and perform branch analysis, but you will only be able to analyze your main branch and no pull request decoration. Please see here for more info: GitHub Integration | SonarQube Docs

Also, in your sonar.properties file within $SONARQUBE_HOME/conf/ folder, there are properties you can set for your internal proxy. You might need this if you need to access Marketplace to download plugins (see “Update Center” in sonar.properties file) for example. If your internal network can access GitHub, then SonarQube can connect to GitHub and it should work.

Joe

Hi @Joe Thanks for the reply. Can I ask on the internal network access to Github, wouldn’t the ALM integration using Github App allows for this? or do you mean that the Sonarqube instance will have to be able to direct access Github from internal network?

Thanks.

HI @Chew_Thiam_Soon

I’m not sure since it depends on how your proxy/internal network is set up. You will have to test it and see what happens with and without the proxy. From my experience, it seems that after you set up the proxy in sonar.properties and that your proxy/internal network allows GitHub access already, then it should allow you to access GitHub from SonarQube. If it doesn’t work, you can set the log level to DEBUG and get more information (see https://docs.sonarqube.org/latest/instance-administration/system-info/ for more information).

@Joe Thank you very much. I will try it out.

1 Like