We have a fresh SonarQube installation (see details in the SonarQube: running tests from Jenkins Pipeline from Docker post).
Contents
The issue
But in its dashboard there is always an error:
SCM provider autodetection failed. Please use “sonar.scm.provider” to define SCM of your project, or disable the SCM Sensor in the project settings.
Also, it’s displayed in a Jenkins builds results.
SonarQube’s Git integration documentation – here>>>.
Setting the sonar.scm.provider=git
option explicitly didn’t help:
ERROR: Error during SonarQube Scanner execution
ERROR: SCM provider was set to “git” but no SCM provider found for this key. No SCM provider installed
But now the root cause became more obvious:
No SCM provider installed
The solution
Go to the SonarQube, Administration > Marketplace and install the Git plugin:
Restart SonarQube and run Jenkin’s job again:
INFO: SCM provider for this project is: git
And SonarQube now will display authors, commits etc:
Done.