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
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With