Using sonar-cnes-report on the command line doesn't work

Hi!

We are running “Developer Edition Version 9.9 (build 65466)” of Sonarqube as a kubernetes pod. It was installed/configured based on the official documentation.

I am trying to use the sonar-cnes-report plugin on the command line, with the following script:
java -jar sonar-cnes-report-4.1.3.jar -t <token> -s https://<sqserver.com> -p <projectID> -b <mybranch>

It generates the following error:
[ERROR] Insufficient privileges error sent by SonarQube server (code 403), please check your permissions in SonarQube configuration.

If I use the plugin using the webUI of sonarqube (More->CNES report), it works fine. I am using the same users who’s token is used in the command line…

There is not much visible in the sonarqube logs, so I would like to ask for help about how to debug this issue. Is there a way to increase the loglevel of the sonarqube instance to see somehow what is actually wrong?
If I mistype the token, I get the message to use a valid token.
If I mistype the projectID, I get an error that there is no such project.
If I mistype the branchName, I get an error that there is no such branch in that project.
So the initial handshake seems to work fine.

I know that the sonar-cnes-report is a community plugin, so I will reach out to the developers as well, but of there is anything on the sonarqube server side I could check, please let me know.

I also know that there is no official release of the sonar-cnes-plugin for SQ 9.9. I have built it myself (based on this PR.

Regards,
Tamas

Hey there.

It looks like you did the right thing by raising your issue directly with the maintainer here: [ERROR] Insufficient privileges error sent by SonarQube server (code 403) · Issue #351 · cnescatlab/sonar-cnes-report · GitHub

Problem solved!

We need to use a ‘User Token’. ‘Global- or Project Analyses Token’ are not good.

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