GitLab运行-无法信任自签名证书

问题描述 投票:1回答:1

[运行GitLab CI Runner时,我必须指定

环境= [“ GIT_SSL_NO_VERIFY = true”]“

没有它,我从GitLab CI收到以下错误

Cloning into 'D:/GitRunner/builds/c2RN8y5j/0/joeybob/mytestproect'...
fatal: unable to access 'https://gitlab-ci-token:[email protected]/joeybob/mytestproect.git/': error setting certificate verify locations:
  CAfile: D:\GitRunner\builds\c2RN8y5j\0\joeybob\mytestproect.tmp\CI_SERVER_TLS_CA_FILE
  CApath: none

检查CI_SERVER_TLS_CA_FILE的内容,我发现它与BEGIN CERTIFICATE和END CERTIFICATE之间的期望值匹配。

当我提示GIT_SSL_NO_VERIFY = true时,CI窗口会产生以下错误,但仍然成功]]

WARNING: Failed to load system CertPool: crypto/x509: system root pool is not available on Windows 
ERROR: Failed to parse PEM in D:\GitRunner\builds\c2RN8y5j\0\joeybob\mytestproect.tmp\CI_SERVER_TLS_CA_FILE 

我认为PEM(crt)文件有问题。我在Windows Server 2016上运行此证书,并以base-64编码的X.509格式从本地受信任的根证书存储中导出了证书。这个问题与Windows编码文件的方式有关吗?

[运行GitLab CI Runner时,我必须指定环境= [“ GIT_SSL_NO_VERIFY = true”]“如果没有它,我会从GitLab CI克隆到'D:/ GitRunner / builds / c2RN8y5j / 0 / joeybob / ...中得到以下错误。

git ssl gitlab gitlab-ci-runner
1个回答
0
投票

Joey,这可能为时已晚,对您不再有用了,但也许也会为您提供帮助。我遇到了完全相同的问题,并通过以下方式解决了它:

这是我想您已经完成的事情:

© www.soinside.com 2019 - 2024. All rights reserved.