gpt4 book ai didi

jenkins-pipeline - 由 jenkins 管道执行时,sonar-scanner.bat 在 api/settings/values.protobuf 上失败并显示 401

转载 作者:行者123 更新时间:2023-12-04 08:34:03 25 4
gpt4 key购买 nike

当我执行下面的管道时,我在 http://mysonarhost.my.domain:9000/api/settings/values.protobuf 上收到 401 错误.

在命令提示符下执行相同的命令没有错误。
可以使用浏览器访问 api/settings/values.protobuf URL。

我尝试在各个地方设置 token ,但似乎都没有帮助。

版本

  • sonarqube 版本 6.3.1(内部版本 21392)
  • Jenkins 版。 RHEL 7 上的 2.75
  • Windows 2012 R2 上的 Jenkins 节点
  • 声纳扫描仪 2.8

  • 管道

    screenshot of pipeline script https://i.imgur.com/S3Vk0fl.png

    日志
    sonar-scanner -X -Dproject.settings=..\sonar_ccesmarttools.properties -Dsonar.logon=mytoken 
    06:32:33.829 INFO: Scanner configuration file: X:\workspaces\common\tools\hudson.plugins.sonar.SonarRunnerInstallation\SonarQubeScanner\bin\..\conf\sonar-scanner.properties
    06:32:33.836 INFO: Project root configuration file: X:\cce\SmartLisaNightly\git\ccesmarttools\CceSmartTools\..\sonar_ccesmarttools.properties
    06:32:33.873 INFO: SonarQube Scanner 3.0.3.778
    06:32:33.874 INFO: Java 1.8.0_73 Oracle Corporation (64-bit)
    06:32:33.874 INFO: Windows Server 2012 R2 6.3 amd64
    06:32:33.874 INFO: SONAR_SCANNER_OPTS=-Xmx16g
    06:32:34.041 DEBUG: keyStore is :
    06:32:34.042 DEBUG: keyStore type is : jks
    06:32:34.042 DEBUG: keyStore provider is :
    06:32:34.042 DEBUG: init keystore
    06:32:34.042 DEBUG: init keymanager of type SunX509
    06:32:34.158 INFO: User cache: C:\Users\jenkinsuser\.sonar\cache
    06:32:34.158 DEBUG: Extract sonar-scanner-api-batch in temp...
    06:32:34.173 DEBUG: Get bootstrap index...
    06:32:34.173 DEBUG: Download: http://mysonarhost.my.domain:9000/batch/index
    06:32:34.232 DEBUG: Get bootstrap completed
    06:32:34.233 DEBUG: Create isolated classloader...
    06:32:34.243 DEBUG: Start temp cleaning...
    06:32:34.255 DEBUG: Temp cleaning done
    06:32:34.255 DEBUG: Execution getVersion
    06:32:34.260 DEBUG: Execution start
    06:32:34.557 DEBUG: Publish global mode
    06:32:34.698 INFO: Load global settings
    06:32:34.749 DEBUG: GET 401 http://mysonarhost.my.domain:9000/api/settings/values.protobuf | time=43ms
    06:32:34.751 INFO: ------------------------------------------------------------------------
    06:32:34.751 INFO: EXECUTION FAILURE
    06:32:34.751 INFO: ------------------------------------------------------------------------
    06:32:34.751 INFO: Total time: 0.961s
    06:32:34.788 INFO: Final Memory: 17M/1963M
    06:32:34.788 INFO: ------------------------------------------------------------------------
    06:32:34.788 ERROR: Error during SonarQube Scanner execution
    java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.bootstrap.ScannerPluginInstaller

    最佳答案

    来自 documentation ,属性应该是 sonar.login ,不是 sonar.logon .

    关于jenkins-pipeline - 由 jenkins 管道执行时,sonar-scanner.bat 在 api/settings/values.protobuf 上失败并显示 401,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46110166/

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