gpt4 book ai didi

sonarqube - SonarQube“权限不足”

转载 作者:行者123 更新时间:2023-12-01 14:02:56 30 4
gpt4 key购买 nike

自从更新到5.x以来,由于“权限不足”问题,我们的许多构建作业现在都失败了。如here中所述,应该在SonarQube 5.1中解决该问题,但实际上它没有得到解决,或者存在另一个与我们当前运行SonarQube 5.1.1相同的错误的问题。

这是错误消息的示例:

08:27:13 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project server: Fail to decorate 'org.sonar.api.resources.File@b77a66[key=src/main/java/ch/ti8m/security/hwtoken/server/services/impl/TOTPAlgorithm.java,path=src/main/java/ch/ti8m/security/hwtoken/server/services/impl/TOTPAlgorithm.java,filename=TOTPAlgorithm.java,language=Java]': Insufficient privileges -> [Help 1]
08:27:13 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project server: Fail to decorate 'org.sonar.api.resources.File@b77a66[key=src/main/java/ch/ti8m/security/hwtoken/server/services/impl/TOTPAlgorithm.java,path=src/main/java/ch/ti8m/security/hwtoken/server/services/impl/TOTPAlgorithm.java,filename=TOTPAlgorithm.java,language=Java]'
08:27:13 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
08:27:13 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
08:27:13 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
08:27:13 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
08:27:13 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
08:27:13 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
08:27:13 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
08:27:13 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
08:27:13 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
08:27:13 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
08:27:13 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
08:27:13 at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
08:27:13 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
08:27:13 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
08:27:13 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
08:27:13 at java.lang.reflect.Method.invoke(Method.java:606)
08:27:13 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
08:27:13 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
08:27:13 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
08:27:13 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
08:27:13 Caused by: org.apache.maven.plugin.MojoExecutionException: Fail to decorate 'org.sonar.api.resources.File@b77a66[key=src/main/java/ch/ti8m/security/hwtoken/server/services/impl/TOTPAlgorithm.java,path=src/main/java/ch/ti8m/security/hwtoken/server/services/impl/TOTPAlgorithm.java,filename=TOTPAlgorithm.java,language=Java]'
08:27:13 at org.codehaus.mojo.sonar.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:41)
08:27:13 at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:139)
08:27:13 at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:132)
08:27:13 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
08:27:13 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
08:27:13 ... 19 more
08:27:13 Caused by: org.sonar.api.utils.SonarException: Fail to decorate 'org.sonar.api.resources.File@b77a66[key=src/main/java/ch/ti8m/security/hwtoken/server/services/impl/TOTPAlgorithm.java,path=src/main/java/ch/ti8m/security/hwtoken/server/services/impl/TOTPAlgorithm.java,filename=TOTPAlgorithm.java,language=Java]'
08:27:13 at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:104)
08:27:13 at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:87)
08:27:13 at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:79)
08:27:13 at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:79)
08:27:13 at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:71)
08:27:13 at org.sonar.batch.phases.DatabaseModePhaseExecutor.execute(DatabaseModePhaseExecutor.java:127)
08:27:13 at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:264)
08:27:13 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
08:27:13 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
08:27:13 at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:235)
08:27:13 at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:230)
08:27:13 at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
08:27:13 at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:220)
08:27:13 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
08:27:13 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
08:27:13 at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
08:27:13 at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
08:27:13 at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
08:27:13 at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
08:27:13 at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
08:27:13 at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
08:27:13 at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
08:27:13 at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
08:27:13 at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
08:27:13 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
08:27:13 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
08:27:13 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
08:27:13 at java.lang.reflect.Method.invoke(Method.java:606)
08:27:13 at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
08:27:13 at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
08:27:13 at java.security.AccessController.doPrivileged(Native Method)
08:27:13 at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
08:27:13 at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
08:27:13 at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
08:27:13 at org.sonar.runner.api.Runner.execute(Runner.java:100)
08:27:13 at org.codehaus.mojo.sonar.bootstrap.RunnerBootstraper.execute(RunnerBootstraper.java:135)
08:27:13 ... 22 more
08:27:13 Caused by: java.lang.IllegalStateException: Insufficient privileges
08:27:13 at org.sonar.batch.bootstrap.ServerClient.handleHttpException(ServerClient.java:137)
08:27:13 at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:107)
08:27:13 at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:99)
08:27:13 at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:87)
08:27:13 at org.sonar.batch.issue.tracking.DefaultServerLineHashesLoader.loadHashesFromWs(DefaultServerLineHashesLoader.java:47)
08:27:13 at org.sonar.batch.issue.tracking.DefaultServerLineHashesLoader.getLineHashes(DefaultServerLineHashesLoader.java:38)
08:27:13 at org.sonar.batch.issue.tracking.SourceHashHolder.initHashes(SourceHashHolder.java:52)
08:27:13 at org.sonar.batch.issue.tracking.SourceHashHolder.getHashedReference(SourceHashHolder.java:60)
08:27:13 at org.sonar.batch.issue.tracking.IssueTracking.mapIssues(IssueTracking.java:83)
08:27:13 at org.sonar.batch.issue.tracking.IssueTracking.track(IssueTracking.java:55)
08:27:13 at org.sonar.batch.issue.tracking.IssueTrackingDecorator.doDecorate(IssueTrackingDecorator.java:139)
08:27:13 at org.sonar.batch.issue.tracking.IssueTrackingDecorator.decorate(IssueTrackingDecorator.java:113)
08:27:13 at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:96)
08:27:13 ... 57 more
08:27:13 [ERROR]
08:27:13 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
08:27:13 [ERROR]
08:27:13 [ERROR] For more information about the errors and possible solutions, please read the following articles:
08:27:13 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
08:27:13 SonarQube analysis completed: FAILURE
08:27:13 Build step 'SonarQube' changed build result to FAILURE
08:27:13 Build step 'SonarQube' marked build as failure

关于如何解决它的任何想法?向所有人授予权限的解决方法是NoGo,因为整个系统必须遵守某些NDA,因此访问受到限制。

最佳答案

运行分析的用户需要权限:

  • 全局:Execute Analysis
  • 项目:BROWSESEE SOURCE CODE

  • SonarQube 5.1.1上测试。

    关于sonarqube - SonarQube“权限不足”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31534221/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com