gitlab-runner x509:未知授权机构签署的证书 [英] gitlab-runner x509: certificate signed by unknown authority
问题描述
我正在尝试按照以下步骤在gitlab上注册新的跑步者: https://docs.gitlab.com/runner/register/index.html
I'm trying to register a new runner on gitlab following these steps : https://docs.gitlab.com/runner/register/index.html
但是当我输入网址,令牌和标签时.弹出错误消息,提示:
but when I enter the url, token and tags. A error message pops-up saying:
错误:正在注册跑步者...跑步者失败= CS-XXX状态=无法针对 https://example.com/api/v4/runners :发布 https://example .com/api/v4/runners :x509:未知授权机构签署的证书
ERROR: Registering runner... failed runner=CS-XXX status=couldn't execute POST against https://example.com/api/v4/runners: Post https://example.com/api/v4/runners: x509: certificate signed by unknown authority
我正在使用新服务器,并且已经安装了gitlab-runner
I'm working on a new server and already installed the gitlab-runner
推荐答案
您需要在注册过程中或跑步者的配置中使用tls-ca-file
选项.
you need to use tls-ca-file
option during registration or in the configuration of your runner.
以下是非交互式注册的示例使用tls-ca-file
选项:
Here is an example of non-interactive registration with tls-ca-file
option :
gitlab-runner register \
--non-interactive \
--registration-token YOUTOKEN \
--url https://example.com/ \
--tls-ca-file /path/to/your/ca.crt
通过其他方式,您可以参考 config.toml
部分中的config.toml
中的tls-ca-file
选项
Other way, you can refer the tls-ca-file
option in your config.toml
under the [[runners]]
section
更多信息: https://docs.gitlab.com/runner /configuration/tls-self-signed.html
这篇关于gitlab-runner x509:未知授权机构签署的证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!