Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gitlab-runner x509: certificate signed by unknown authority

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

like image 340
Abhishek Rane Avatar asked Apr 11 '19 00:04

Abhishek Rane


People also ask

What is GitLab runner executor?

GitLab Runner implements a number of executors that can be used to run your build. It determines the environment each job runs in. For example, If I want CI/CD job to run PowerShell commands, I might install GitLab Runner on a server and then register a runner that uses the shell executor.

How do I get my GitLab certificate?

GitLab offers technical certifications to help the GitLab community and team members validate their ability to apply GitLab in their daily DevOps work. To earn certification, candidates must first pass a written assessment, followed by a hands-on lab assessment graded by GitLab Professional Services engineers.

How do I register for GitLab runner?

To register the runner with GitLab first you need to get a registration token from the GitLab web interface. It is generated by GitLab and it can be found in your projects settings under settings/ci_cd/Set up a specific Runner manually . You can find more information how to register a GitLab Runner.


1 Answers

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

like image 196
Nicolas Pepinster Avatar answered Oct 08 '22 10:10

Nicolas Pepinster