【问题标题】:Gitlab : Peer's certificate issuer has been marked as not trusted by the userGitlab : Peer 的证书颁发者已被用户标记为不信任
【发布时间】:2020-10-05 13:42:25
【问题描述】:

我有一个本地 gitlab,我试图在其中运行一些构建/管道,但出现以下错误 -

fatal: unable to access 'https://gitlab-ci-token:[MASKED]@gitlab.systems/testing/test-project-poc.git/': Peer's certificate issuer has been marked as not trusted by the user.

我已经对此进行了调查-Gitlab:Peer's Certificate issuer is not recognized,并按照通过合并server certificateintermediate certificateroot certificate 来获取.pem 文件的步骤,但我仍然遇到以下错误并且真的很难找到根本原因。

/etc/gitlab/gitlab.rb config

##! enable/disable 2-way SSL client authentication
#nginx['ssl_verify_client'] = "off"

##! if ssl_verify_client on, verification depth in the client certificates chain
#nginx['ssl_verify_depth'] = "1"

nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.systems.pem"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.systems.key"

我需要更新/修改任何其他配置吗?非常感谢任何指导。

【问题讨论】:

    标签: gitlab gitlab-ci-runner gitlab-omnibus


    【解决方案1】:

    我猜您正在使用自签名证书。如果是这种情况,您有两种选择来纠正此问题:

    1. 推荐选项:这里我再次假设您已经解决了 gitlab-runner 和 gitlab itseld 之间的问题,因此您成功注册了 runner。所以你已经在 /etc/gitlab-runner/certs 中拥有了证书文件。因此,在托管 gitlab-runner 的服务器上,运行以下命令:

      git config --system http.sslCAInfo /etc/gitlab-runner/certs/CERITIFICATE_NAME.crt
    2. 这是不安全的:这里你只是禁用了 git https 证书验证:

      git config --system http.sslverify false

    【讨论】:

    • 此处的选项 1 解决了我的“无法识别对等证书颁发者”的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-04-19
    • 1970-01-01
    • 2018-01-18
    • 2011-03-10
    • 2016-05-25
    • 2015-01-17
    • 2017-03-02
    相关资源
    最近更新 更多