Caused by: Not authorized. Analyzing this project requires authentication. Please provide a user tok

I have this authenticator problem, I’ve already done everything with the permissions on localhost, I’ve already enabled the permissions, I’ve created the token several times and it still doesn’t work.

I’ve tried that way too dotnet sonarscanner begin /k: /d:sonar.token= and still this error appears “11:53:33.423 Unauthorized: Access is denied due to invalid credentials. Please check the authentication parameters.
11:53:33.431 Pre-processing failed. Exit code: 1”

1 Like

Hey there.

What version of SonarQube are you using?

is the latest 10.0.0.68432

I am having a similar issue, I’ve tried with a token and sonar.login with sonar.password. I’ve tried giving the user global and project specific analyze permissions. Not sure what else to try.

I am also running the latest version.

Thanks everyone.

@failkiti @Derek_Jones are you running this tests locally or in a CI environment?

I don’t know anymore, it’s probably testing locally, I followed some tutorials on YouTube, I did the step by step and even so I have an authenticator problem, I don’t know much either, I just took it to test and make it work as a learning experience.

if you could talk to me on discord it would be better because i have a lot of doubts too and a lot of errors and i would like some help failkiti#7766

finally got it

image

my problem was to configure the sonar-scanner environment variables and also some files were missing that i had removed from the folder i installed everything again.

the problem was that in the environment variables it was correct but some files were missing inside the folder.

before it was like this.

image

and it was for this.

image

after I did that, I went to sonar-scanner and edited the conf in the sonar-scanner folder

sonar.projectKey = key
sonar.projectName = name
sonar.projectVersion = 1.0
sonar.sources = the repository
sonar.languages= languages

then I made the login token at localhost:9000 after that I copied the token that would be the number and letters and went to where the repository was that I wanted to analyze and wrote cmd to open the cmd with the direct folder of the repository then I did the following.

" sonar-scanner -Dsonar.login=Token"

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.