I am trying to run sonar scanner locally on my .net project. But I get “Unauthorized: Access is denied due to invalid credentials. Please check the authentication parameters.” error when I run the command -
SonarScanner.MSBuild.exe begin /k:“XXX” /d:sonar.token=“sqa_XXX”
When I go to sonar cube server - http://localhost:9000 → [Analysis Method] → [Locally] → #Analyze your project, I see the token is valid.
Sonar Cube Version - 10.5.1.90531
Sonar Scanner Version - sonar-scanner-6.2.0.85879-net-framework
Local .Net project target framework - net472
Please note -
- I installed sonarscanner and unblocked the zip file
- I added <INSTALL_DIRECTORY> of sonarscanner to PATH env variable
Would appreciate a quick help on this.