NPM sonarqube-scanner失败,显示401未经授权

时间:2018-10-09 14:22:44

标签: npm sonarqube sonarqube-scan

我们使用npm软件包sonarqube-scanner版本2.1.1来分析我们的angular / typescript项目。但是从昨天开始,从网站上下载声纳扫描仪时,声纳分析失败并显示401。

我检查了URL,而https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.2.0.1227-linux.zip确实需要认证。有人知道为什么还是有解决方法?

09-Oct-2018 13:24:08    [11:24:08] Starting SonarQube analysis...
09-Oct-2018 13:24:08    [11:24:08] Checking if executable exists: /root/.sonar/native-sonar-scanner/sonar-scanner-3.2.0.1227-linux/bin/sonar-scanner
09-Oct-2018 13:24:08    [11:24:08] Could not find executable in "/root/.sonar/native-sonar-scanner".
09-Oct-2018 13:24:08    [11:24:08] Proceed with download of the platform binaries for SonarQube Scanner...
09-Oct-2018 13:24:08    [11:24:08] Creating /root/.sonar/native-sonar-scanner
09-Oct-2018 13:24:08    [11:24:08] Downloading from https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.2.0.1227-linux.zip
09-Oct-2018 13:24:08    [11:24:08] (executable will be saved in cache folder: /root/.sonar/native-sonar-scanner)
09-Oct-2018 13:24:09    [11:24:09] ERROR: impossible to download and extract binary: Response code 401 (Unauthorized)
09-Oct-2018 13:24:09    [11:24:09]        SonarQube Scanner binaries probably don't exist for your OS (linux).
09-Oct-2018 13:24:09    [11:24:09]        In such situation, the best solution is to install the standard SonarQube Scanner (requires a JVM).
09-Oct-2018 13:24:09    [11:24:09]        Check it out at https://redirect.sonarsource.com/doc/install-configure-scanner.html
09-Oct-2018 13:24:09    

2 个答案:

答案 0 :(得分:1)

好像他们更改了二进制下载的URL。如果您使用npm软件包,则需要安装2.1.2

答案 1 :(得分:1)

我今天打了这个。经过调查,似乎声纳将其二进制文件从“ sonarsource.bintray.com”移动到了“ binaries.sonarsource.com”。其余的url结构看起来相同。

这是链接到下载的声纳页面: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner