• <bdo id='pLfqQ'></bdo><ul id='pLfqQ'></ul>
    <i id='pLfqQ'><tr id='pLfqQ'><dt id='pLfqQ'><q id='pLfqQ'><span id='pLfqQ'><b id='pLfqQ'><form id='pLfqQ'><ins id='pLfqQ'></ins><ul id='pLfqQ'></ul><sub id='pLfqQ'></sub></form><legend id='pLfqQ'></legend><bdo id='pLfqQ'><pre id='pLfqQ'><center id='pLfqQ'></center></pre></bdo></b><th id='pLfqQ'></th></span></q></dt></tr></i><div id='pLfqQ'><tfoot id='pLfqQ'></tfoot><dl id='pLfqQ'><fieldset id='pLfqQ'></fieldset></dl></div>
      <tfoot id='pLfqQ'></tfoot>

      1. <legend id='pLfqQ'><style id='pLfqQ'><dir id='pLfqQ'><q id='pLfqQ'></q></dir></style></legend>

        <small id='pLfqQ'></small><noframes id='pLfqQ'>

      2. Sonarqube v.4 TFS 任务“发布分析结果"抛出错误“无法获取指标"

        时间:2023-10-24
        <i id='OjeiC'><tr id='OjeiC'><dt id='OjeiC'><q id='OjeiC'><span id='OjeiC'><b id='OjeiC'><form id='OjeiC'><ins id='OjeiC'></ins><ul id='OjeiC'></ul><sub id='OjeiC'></sub></form><legend id='OjeiC'></legend><bdo id='OjeiC'><pre id='OjeiC'><center id='OjeiC'></center></pre></bdo></b><th id='OjeiC'></th></span></q></dt></tr></i><div id='OjeiC'><tfoot id='OjeiC'></tfoot><dl id='OjeiC'><fieldset id='OjeiC'></fieldset></dl></div>
          <tbody id='OjeiC'></tbody>
        <tfoot id='OjeiC'></tfoot>
        1. <small id='OjeiC'></small><noframes id='OjeiC'>

              <legend id='OjeiC'><style id='OjeiC'><dir id='OjeiC'><q id='OjeiC'></q></dir></style></legend>
                <bdo id='OjeiC'></bdo><ul id='OjeiC'></ul>

                • 本文介绍了Sonarqube v.4 TFS 任务“发布分析结果"抛出错误“无法获取指标"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 TFS 上,我无法运行任务发布分析结果"以在 TFS 网页上发布质量门.其他任务Prepare analysis on SonarQube"和Run Code Analysis"运行成功.

                  On TFS, I am not being able to run the taks "Publish Analysis Result" to publish Quality Gate on TFS web page. The other tasks "Prepare analysis on SonarQube" and "Run Code Analysis" runs successfully.

                  错误信息是:

                  [错误][SQ] 无法获取指标

                  [error][SQ] Could not fetch metrics

                  [错误][SQ] 无法获取 ID 'FWK9NiOFibiMfA2L0BHo' 的任务

                  [error][SQ] Could not fetch task for ID 'FWK9NiOFibiMfA2L0BHo'

                  尽管有错误消息,当我访问 url http://localhost:9000/api/ce/task?id=FWK9NiOFibiMfA2L0BHo 我收到一个包含任务信息的 json 响应.

                  Despite the error message, when I access the url http://localhost:9000/api/ce/task?id=FWK9NiOFibiMfA2L0BHo I get a json response with the task information.

                  推荐答案

                  似乎是 SonarQube VSTS 扩展的问题:

                  Seems it's an issue with the SonarQube VSTS Extensions:

                  SonarQube 扩展使用基本身份验证与SonarQube API 端点,并使用令牌作为用户名,以及密码为空.npm 包请求"(至少是最新版本2.83.0),不允许空密码并返回auth()收到无效的用户或密码".

                  The SonarQube extension uses basic authentication to communicate with the SonarQube API endpoint, and uses the token as username, and password as null. The npm package 'request' (at least latest version 2.83.0), does not allow null passwords and returns 'auth() received invalid user or password'.

                  要解决此问题,应将密码设置为空字符串.

                  To fix it, the password should be set to an empty string instead.

                  在 SonarSource 修复 VSTS 插件之前,您可以解决通过在 VSTS 构建机器上手动编辑扩展来发布.要编辑的文件是:

                  Until the VSTS plugin is fixed by SonarSource, you can workaround the issue by manually editing the extension on your VSTS build machine. The file to edit is: <build location>\_tasksSonarQubePublish_291ed61f-1ee4-45d3-b1b0-bf822d9095ef4.0.0commonhelpers equest.js

                  在第 22 行之后添加一个新行:

                  Add a new row after row 22:

                  options.auth.pass = "";
                  

                  有关详细信息,请参阅此类似线程:无法将 SonarQube 分析结果与 VSTS 构建摘要集成

                  Just refer to this similar thread for details : Unable to integrate SonarQube analysis results with VSTS Build Summary

                  这篇关于Sonarqube v.4 TFS 任务“发布分析结果"抛出错误“无法获取指标"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                      <tfoot id='tqFhz'></tfoot>
                    1. <legend id='tqFhz'><style id='tqFhz'><dir id='tqFhz'><q id='tqFhz'></q></dir></style></legend>
                        <bdo id='tqFhz'></bdo><ul id='tqFhz'></ul>
                      • <small id='tqFhz'></small><noframes id='tqFhz'>

                        <i id='tqFhz'><tr id='tqFhz'><dt id='tqFhz'><q id='tqFhz'><span id='tqFhz'><b id='tqFhz'><form id='tqFhz'><ins id='tqFhz'></ins><ul id='tqFhz'></ul><sub id='tqFhz'></sub></form><legend id='tqFhz'></legend><bdo id='tqFhz'><pre id='tqFhz'><center id='tqFhz'></center></pre></bdo></b><th id='tqFhz'></th></span></q></dt></tr></i><div id='tqFhz'><tfoot id='tqFhz'></tfoot><dl id='tqFhz'><fieldset id='tqFhz'></fieldset></dl></div>
                            <tbody id='tqFhz'></tbody>