gitlab-runner x509:由未知权威签署的证书 [英] gitlab-runner x509: certificate signed by unknown authority

查看:28
本文介绍了gitlab-runner x509:由未知权威签署的证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照以下步骤在 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

但是当我输入 url、token 和标签时.弹出一条错误消息说:

but when I enter the url, token and tags. A error message pops-up saying:

错误:正在注册跑步者...失败跑步者=CS-XXX 状态=无法针对 https 执行 POST://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

其他方式,您可以参考[[runners]] 部分下的 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆