gitlab-runner x509:由未知权限签名的证书

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

我正在尝试按照以下步骤在gitlab上注册一个新的跑步者:https://docs.gitlab.com/runner/register/index.html

但是当我输入网址,令牌和标签时。弹出错误消息说:

错误:注册跑步者...失败的跑者= CS-XXX状态=无法对https://example.com/api/v4/runners执行POST:发布https://example.com/api/v4/runners:x509:由未知权威签署的证书

我正在开发一台新服务器并且已经安装了gitlab-runner

openssl certificate gitlab gitlab-ci-runner
1个回答
2
投票

您需要在注册期间或在跑步者的配置中使用tls-ca-file选项。

以下是使用non-interactive选项注册tls-ca-file的示例:

gitlab-runner register \
      --non-interactive \
      --registration-token YOUTOKEN \
      --url https://example.com/ \
      --tls-ca-file /path/to/your/ca.crt

换句话说,你可以在refer部分的tls-ca-file中使用config.toml [[runners]]选项

更多信息:https://docs.gitlab.com/runner/configuration/tls-self-signed.html

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