kubernetes - 致命: unable to access 'https://gitlab-ci-token:[MASKED]@gitlab.mydomain.com/xxx.git/' : SSL certificate problem: unable to get issuer certificate

标签 kubernetes certificate ssl-certificate x509certificate gitlab-ci-runner

我无法成功运行 autodevops 管道。我已经阅读了多个教程、指南、问题、修复、解决方法,但现在我需要您的支持。

我有一个家庭 kubernetes 集群(两个虚拟机)和一个使用 HTTPS 的 GitLab 服务器。我已经设置了集群并在 GitLab 组级别中定义了它(安装了 helm、ingress、runner)。我必须做一些调整才能使运行程序在 gitlab 中注册(它最初不接受证书)。

现在,当我运行 autodevops 管道时,我在日志中收到如下错误:

Running with gitlab-runner 11.9.0 (692ae235)
  on runner-gitlab-runner-5976795575-8495m cwr6YWh8
Using Kubernetes namespace: gitlab-managed-apps
Using Kubernetes executor with image registry.gitlab.com/gitlab-org/cluster-integration/auto-build-image/master:stable ...
Waiting for pod gitlab-managed-apps/runner-cwr6ywh8-project-33-concurrent-0q7bdk to be running, status is Pending
Running on runner-cwr6ywh8-project-33-concurrent-0q7bdk via runner-gitlab-runner-5976795575-8495m...
Initialized empty Git repository in /testing/helloworld/.git/
Fetching changes...
Created fresh repository.
fatal: unable to access 'https://gitlab-ci-token:[MASKED]@gitlab.mydomain.com/testing/helloworld.git/': SSL certificate problem: unable to get issuer certificate

我尝试了很多解决方法,例如在 /home/gitlab-runner/.gitlab-runner/certs/gitlab.mydomain.com.crt 下添加我的域的 CA 证书,但仍然没有结果。

最佳答案

当无法验证自签名证书时,会发生错误。

除了添加 CA 证书之外的另一个解决方法是强制 git 不使用全局选项执行证书验证:

$ git config --global http.sslVerify false

关于kubernetes - 致命: unable to access 'https://gitlab-ci-token:[MASKED]@gitlab.mydomain.com/xxx.git/' : SSL certificate problem: unable to get issuer certificate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56411421/

相关文章:

ios - 是否可以为将 APN 发送到同一应用程序的提供商创建多个 SSL 证书?

mysql - 两个 mariadb 实例在 docker 中使用相同的持久存储

kubernetes - 如何通过 id 从 grafana.com 导入仪表板?没有 json 文件和 configMap

kubernetes - 如何根据 celery 任务队列中的任务数自动扩展 Kubernetes Pods?

windows - 如何更改远程桌面的证书?

具有多个 SSL 证书的 Java 服务器

node.js - 在 Node.js 中为 SSL 加载证书和私钥

python - 在Kubernetes Pod上的Pip安装失败

php - Windows 服务器推送通知 iOS 的 APNS 问题

cmd - 如何为使用 OpenSSL 生成的证书提供多行证书名称 (CN)