我正在尝试在公司的本地网络服务器上注册一个Git Runner,GitLab与自签名证书正常工作,但是尝试像这样注册Git Runner时:
我没有使用Docker,只是普通的设置,请提供任何帮助,非常感谢。
即使我使用.crt文件注册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/
然后是令牌:
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,只是普通的设置,请提供任何帮助,非常感谢。
更新:
我将DNS服务器的名称服务器添加到/ etc / resolv.conf中,最后一个错误消失了,但我有新的错误:
x509: certificate has expired or is not yet valid
即使我使用.crt文件注册runner,如文档所述,并且使用进行注册。
sudo gitlab-runner register --tls-ca-file /path/to/some-host-gitlab.com.crt
这是自签名证书
更新
如果是自签名证书,那么从2019年6月5日至2019年7月5日有效的证书是否重要?
dnsmasq
或其他本地解析器,并且系统已配置为使用它作为名称服务器。这与 GitLab Runner 无关。您需要修复您的本地 DNS 配置。 - Jonathon Reinhart