我正在尝试按照以下步骤在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
您需要在注册期间或在跑步者的配置中使用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