0
votes

I try to setup SonarQubein Azure DevOps. For that, I added the Prepare Analysis task and connected it via a token to my account. After the build, I have the Run Code Analysis I have the Code Analysis Tasks. But they throw the following error:

ERROR: Error during SonarQube Scanner execution

ERROR: You're not authorized to run analysis. Please contact the project administrator.

ERROR:

When I execute it with the same token on my local computer it works as expected and the data is uploaded.

My Configuration:

enter image description here

moneyfox is the Organization Key. I also tried the project_key. But that lead to issues with loading components.

enter image description here

Edit: when I use the Project key ("MoneyFox_MoneyFox"), I get this error in the Run Code Analysis Task:

enter image description here

Do I have to set something on the page that I can execute in Azure DevOps?

2

2 Answers

0
votes

It should be project key, It works correctly on my side.

enter image description here

Build pipeline config

enter image description here

Test result:

enter image description here

0
votes

Refer this guide to setup SonarQube with Azure DevOps.