SonarScanner 6.x: The properties 'sonar.login' and 'sonar.password' are deprecated

Hi,

with the new Scanner I get the warning:

The properties 'sonar.login' and 'sonar.password' are deprecated and will be removed in the future. Please pass a token with the 'sonar.token' property instead.

In the past, it was possible to install a new version of SonarQube in a CI/CD system and then execute integration tests. To start SQ and run the scanner, login/password=admin/admin could be used.

If login/password is no longer supported in the scanner and a token is required, the integration test can no longer be executed. How do I get a token in such a setup?

Regards,

Hey @guwirth

You may be interested at looking what we do for our own integration tests:

Basically, call POST API/user_tokens/generate using the default credentials (admin/admin) and use that token in the scans.

Hi @Colin,

Thanks for your hint!

It’s working: I’m able to use the Web API with the default admin/admin to create a token.

Regards,
Günter

1 Like

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