ERROR: Not authorized. Please check the properties sonar.login and sonar.password

Performing the analyses from Travis on SonarCloud, I got the following error:

$ sonar-scanner
INFO: Scanner configuration file: /home/travis/.sonarscanner/sonar-scanner/conf/
INFO: Project root configuration file: /home/travis/build/pepstock-org/Charba/
INFO: SonarQube Scanner
INFO: Java 1.8.0_141 Oracle Corporation (64-bit)
INFO: Linux 4.4.0-101-generic amd64
INFO: User cache: /home/travis/.sonar/cache
INFO: SonarQube server 8.0.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 3.570s
INFO: Final Memory: 6M/121M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The command "sonar-scanner" exited with 1.

I changed the token and reassigned into a environment variable but it doesn’t work.

Same problem as Not authorized using travis since 1st of march. Maybe the problem is travis and not sonarcloud? Could someone of sonarCloud verify it?

I seem to be having the same problem but in TeamCity. Happened in the last 24 hours.


I believe the issue is on Travis side.

We didn’t push any change that could explain such errors.

A workaround I found is to write the encrypted value directly in the .travis.yml file, instead of in a variable. But I can understand that it’s not really convenient.

I asked for more information on a topic on their community forum:

Hope that helps,


1 Like

Just to avoid confusion, your problem is actually different.

Thank you Benoit. I had the feeling the issue was a Travis issue but I preferred to start from the end of the chain

And I confirm that the issue is different

Hi all, I opened an issue into Travis and they provided me the solution.

The definition in Travis for Sonar addon is changed:


     organization: "pepstock-org"
       secure: ${SONAR_TOKEN}


    organization: "pepstock-org"
    token: ${SONAR_TOKEN}