gpt4 book ai didi

linux - 无法在本地网络服务器上注册 git runner

转载 作者:可可西里 更新时间:2023-11-01 11:51:17 25 4
gpt4 key购买 nike

我正在尝试在我公司的本地网络服务器上注册一个 git runner,gitlab 使用自签名证书工作正常,但是当尝试像这样注册一个 git runner 时

sudo gitlab-runner register --tls-ca-file=/home/gitlab-runner/certs/git.crt

然后粘贴git URL

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/)
https://git.mycompany/

然后是 token :

Please enter the gitlab-ci token for this runner: 
TOKEN

然后是描述和标签,然后我得到这个错误:

ERROR: Registering runner... failed   
runner=TOKEN status=couldn't execute POST against https://git.mycompany/api/v4/runners:
Post https://git.mycompany/api/v4/runners:
dial tcp: lookup git.mycompany on 127.0.0.53:53:
no such host
PANIC: Failed to register this runner. Perhaps you are having network problems

我没有使用 docker,只是正常设置,请提供任何帮助,非常感谢

enter image description here

更新:

我将 DNS 服务器的名称服务器添加到/etc/resolv.conf,最后一个错误消失了,但我有新的错误:

 x509: certificate has expired or is not yet valid

即使我将 .crt 的运行者注册为 documentation

sudo gitlab-runner register --tls-ca-file /path/to/some-host-gitlab.com.crt

自签名证书

enter image description here

更新

从 6/5/2019 到 7/5/2019 有效的证书如果是自签名证书是否重要?

enter image description here

最佳答案

关于 DNS 问题,您必须更改 /etc/resolv.conf 中的 DNS 服务器,并将您的 nameserver 设置为您的 DNS。

对于证书,Gitlab 运行器默认检查系统证书存储并根据存储在系统中的 CA 验证 Gitlab 服务器。要将您的证书添加到系统中,您应该将受信任的证书添加到 /usr/local/share/ca-certificates/ 并执行 sudo update-ca-certificates。或者您可以在注册运行者时将证书设置为参数--tls-ca-file

我建议创建一个具有更多验证天数的新证书。 (不要忘记在 apache2 或 ngix 中更改 gitlab 配置中的证书路径。

关于linux - 无法在本地网络服务器上注册 git runner,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57622845/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com