gitlab-runner x509: certificate signed by unknown authority

风流意气都作罢 提交于 2020-01-23 02:17:10

问题


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:

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

I'm working on a new server and already installed the gitlab-runner


回答1:


you need to use tls-ca-file option during registration or in the configuration of your runner.

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

Other way, you can refer the tls-ca-file option in your config.toml under the [[runners]] section

more info : https://docs.gitlab.com/runner/configuration/tls-self-signed.html



来源:https://stackoverflow.com/questions/55622960/gitlab-runner-x509-certificate-signed-by-unknown-authority

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!