SonarQube analysis without pushing the results to the SonarQube server

sonarqube

(Swapna Konuganti) #1
  • using 7.2.1 versions od SonarQube
  •  at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
      at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
      at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
      at org.sonar.runner.api.Runner.execute(Runner.java:100)
      at org.sonar.ant.SonarTask.launchAnalysis(SonarTask.java:53)
      at org.sonar.ant.SonarTask.execute(SonarTask.java:48)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
      at org.apache.tools.ant.Task.perform(Task.java:350)
      at org.apache.tools.ant.Target.execute(Target.java:449)
      at org.apache.tools.ant.Target.performTasks(Target.java:470)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      at org.apache.tools.ant.Main.runBuild(Main.java:834)
      at org.apache.tools.ant.Main.startAnt(Main.java:223)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
    

Caused by: You’re only authorized to execute a local (preview) SonarQube analysis without pushing the results to the SonarQube server. Please contact your SonarQube administrator.

Is there anysetup to fix this issue ?


(G Ann Campbell) #2

Hi,

This error means that analysis of your project is not open to Anyone (a special group meaning “anonymous”), so you must pass the user token of a user who has analyze on the project.

 
Ann


(Swapna Konuganti) #3

Thank you!

I have created new Token(attached screenshot)… Do I need to include in “sonar-project.properties” fiel ? if so can you please provide me the line of code


(G Ann Campbell) #4

Hi,

This should help: https://docs.sonarqube.org/display/SONAR/User+Token

 
Ann


(Swapna Konuganti) #5

I have added, still getting same error


(G Ann Campbell) #6

Hi,

So first, I should have pointed out that in an earlier email you published your token value. You really want to throw that one away now and generate a new one.

Second, I don’t see any errors in that screenshot. What leaps to my eyes is

BUILD SUCCESSFUL

Also, if you can in the future, copy/pasting the text of the console rather than a screenshot is really more user-friendly.

 
Ann