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 !
Just install it as a regular Gitlab CI runner and use the shell executor. Add tags while registering the runner so you can use it for specific jobs of your pipeline that require this runner.
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