Gitlab-runner on another server

Viewed 3817

I would like execute gitlab-runner on another server than my own gitlab ci server. I want to do this to use the environment of this another server, and execute my code. I tried to copy and execute the binary 'gitlab-runner' on this server, after some question, I have a certificate error, but the certificat is correctly installed on my gitlab server!

First, is that the correct way to execute a runner on another server ?

Second, how can i solve this certificate error ?

gitlab-runner --debug register
Runtime platform  arch=amd64 os=linux revision=adfc387 version=9.2.0
Checking runtime mode  GOOS=linux uid=1125
WARNING: Running in user-mode.
WARNING: The user-mode requires you to manually start builds processing:
WARNING: $ gitlab-runner run
WARNING: Use sudo for system-mode:
WARNING: $ sudo gitlab-runner...

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
https://mygitlab.myserver.fr/
Please enter the gitlab-ci token for this runner:
iYwQbJ-b2qg2JLu4sqn8
Please enter the gitlab-ci description for this runner:
[server1]: runnertest
Please enter the gitlab-ci tags for this runner (comma separated):

Whether to lock Runner to current project [true/false]:
[false]:
Dialing: tcp mygitlab.myserver.fr:443 ...
ERROR: Registering runner... failed                 runner=iYwQbJ-b 
status=couldn't execute POST against 
https://mygitlab.myserver.fr/api/v4/runners: Post 
https://mygitlab.myserver.fr/api/v4/runners: x509: certificate signed by 
unknown authority
Dialing: tcp mygitlab.myserver.fr:443 ...
ERROR: Checking GitLab compatibility... not-compatible  reason=GitLab Runner 
>= 9.0 can be used ONLY with GitLab CE/EE >= 9.0 result=-1 runner=iYwQbJ-b 
statusText=couldn't execute POST against 
https://mygitlab.myserver.fr/api/v4/runners/verify: Post 
https://mygitlab.myserver.fr/api/v4/runners/verify: x509: certificate signed 
by unknown authority
PANIC: Failed to register this runner. Perhaps you are having network problems

When I curl the url, I received :

curl -X POST -k --form "token=iYwQbJ-b2qg2JLu4sqn8" https://mygitlab.myserver.fr/api/v4/runners/verify
{"message":"403 Forbidden"}

Thank you very much !

1 Answers
Related