Token issue: maybe expired?

Our build today started to fail due to Not authorized error during Maven build.

ERROR: Error during SonarQube Scanner execution
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.

and the configuration has not changed from yesterday when the build worked.

Maybe the token expires? It has been created less than a year ago.

It seems like the issue was related to secure key in sonarcloud addon configuration in .travis.yml configuration file.
Using the Environment Variables from Travis CI to set the Sonar token requires the token to be defined with token: $SONAR_TOKEN where SONAR_TOKEN is the env variable with the token.
This change https://github.com/project-xavier/xavier-integration/pull/88/files fixed (and better explains) the issue.

It seems strictly related to https://travis-ci.community/t/sonar-scanner-is-not-working-anymore/5848/4 and https://headwayapp.co/travis-ci-changelog/more-secure-handling-of-secure-values-in-configuration-126390 even if the reason why it failed since March 2nd 2020 is still unclear to me.

1 Like