Arrived the error while running "sonar-scanner"

I have activated the trial license key yesterday and try to run “sonar-scanner” on my Linux machine (Ubuntu 18.04 LTS) but I have got following error:

ERROR: Error during SonarQube Scanner execution
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

I tried to for technical support but still not received any response. Can you please help me in that case? or align me to some of the technical guy so I can coordinate with him, it would be really great help.

Hey there. As the logs suggest, you need to pass -Dsonar.login=username -Dsonar.password=password (replacing the username and password values with appropriate values) to the sonar-scanner command.

A token (generated in the SQ UI) passed to -Dsonar.login will also do.

The user in question will also need to have Execute Analysis permissions.

Thank you brother for your post. but when I run as you suggest it produces different following new error:

ERROR:

The only way to get an accurate analysis of C/C++/Objective-C files is by using the SonarSource build-wrapper
and setting the property “sonar.cfamily.build-wrapper-output”, but it was not specified.

If you don’t want to analyze C/C++/Objective-C files, then prevent them from being analyzed by setting the following properties:

sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 28.691s
INFO: Final Memory: 73M/1225M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR:

The only way to get an accurate analysis of C/C++/Objective-C files is by using the SonarSource build-wrapper
and setting the property “sonar.cfamily.build-wrapper-output”, but it was not specified.

If you don’t want to analyze C/C++/Objective-C files, then prevent them from being analyzed by setting the following properties: I also have attached screenshot

sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-

ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

What does the error tell you? :slight_smile: Are you trying to analyze C/C++ files?

If you are, there’s a great tutorial in the UI when you create a project, and further documentation on Analyazing C/C++ code