Getting Error trying to trigger SonarCloud from Jenkins


We’ve been trying to follow the guidance from the forums to setup our Jenkins server to talk to SonarCloud, but we’ve been getting the error below.

Organization of component with key 'our project key' does not match specified organization 'default'

I can’t see any documentation regarding an organization property anywhere.

Any suggestions would be hugely appreciated!

Hi Nathan,

how did you find the command line to run to trigger the analysis? If you created your project from the Web interface, you ended up on the empty project home page which shows a tutorial. Using that tutorial, you are supposed to find the relevant command to execute, and this command will include a sonar.organization parameter that is mandatory.

Hi Fabrice,

I am getting the same issue having copied the code directly from SonarCloud. On the project overview page having used an existing token > selected my language > copy final line of code with the /d:sonar.login switch.

Do I need to add another /d: switch with sonar.organization or o:/ switch of the same?

Thanks for your help.

@CoderKooke If you copied the code from the tutorial available on the project overview page, then you must already have copied the /d:sonar.organization switch. Using /o: should do the same.

BTW, it’s probably best that you open another thread since your question might not relate to the poster’s original one. I guess @ndmckeown wouldn’t appreciate that his thread gets highjacked by another question :slight_smile:

@Fabrice_Bellingard It’s fine. I managed to get my thing resolved. Thanks for your help!