【问题标题】:sonarqube - adding self signed certificate to connect with gitsonarqube - 添加自签名证书以连接 git
【发布时间】:2020-04-05 01:32:24
【问题描述】:

我有自签名证书来连接到 azure devops server 2019。我已经在 git root 证书中注册了自签名证书。 现在,我想配置 sonarqube 在自托管代理上使用自签名证书。 我尝试在服务器和自托管代理上使用 keytool 在 java 的密钥库中注册证书。但到目前为止没有成功。

下面是Log sonar Prepare分析

##[section]Starting: Prepare analysis on SonarQube
==============================================================================
Task         : Prepare Analysis Configuration
Description  : Prepare SonarQube analysis configuration
Version      : 4.8.0
Author       : sonarsource
Help         : [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
SYSTEMVSSCONNECTION exists true
##[warning]Unable to get default branch, defaulting to 'master': Error: unable to get local issuer certificate
[command]D:\Agent-Pools\sonaragent\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.8.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:devops-dashboard-core
SonarScanner for MSBuild 4.7.1
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
22:37:00.721  Updating build integration targets...
22:37:00.808  Fetching analysis configuration settings...
22:37:02.839  Provisioning analyzer assemblies for cs...
22:37:02.84  Installing required Roslyn analyzers...
22:37:03.386  Provisioning analyzer assemblies for vbnet...
22:37:03.386  Installing required Roslyn analyzers...
22:37:03.439  Pre-processing succeeded.
##[section]Finishing: Prepare analysis on SonarQube

【问题讨论】:

    标签: git sonarqube sonarqube-scan


    【解决方案1】:

    如果您已将证书添加到代理,则可以将 NODE_EXTRA_CA_CERTS 变量设置为指向您的 ca 证书或证书。

    在我的例子中,我添加了环境变量并将值设置为用于签署证书的 ca 证书。

      - name: NODE_EXTRA_CA_CERTS
        value: /etc/ssl/certs/ca-certificates.crt
    

    感谢克里斯·哈迪: https://community.sonarsource.com/t/tfs-buid-server-cannot-connect-to-teh-sonarqube-server-over-ssl/1194/3

    更多关于 NODE_EXTRA_CA_CERTS 的信息在这里: https://groups.google.com/forum/#!msg/sonarqube/1W8raF6ZMVM/iFgQhVENAAAJ

    【讨论】:

      猜你喜欢
      • 2019-08-23
      • 1970-01-01
      • 1970-01-01
      • 2012-08-14
      • 2017-12-18
      • 2023-04-02
      • 2023-03-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多