Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding GitLab Runner Registration Token #25

Merged
merged 1 commit into from
Sep 20, 2022
Merged

Adding GitLab Runner Registration Token #25

merged 1 commit into from
Sep 20, 2022

Conversation

evanstucker-hates-2fa
Copy link
Contributor

Example output for good token:

$ ./keyhacks.sh gitlab_runner_registration_token GR1348941RLoRqn-LN-ZsZHUoa23A
docker run --rm gitlab/gitlab-runner register --non-interactive --executor "docker" --docker-image alpine:latest --url "https://gitlab.com/" --registration-token "GR1348941RLoRqn-LN-ZsZHUoa23A" --description "keyhacks-test" --maintenance-note "Testing token with keyhacks" --tag-list "docker,aws" --run-untagged="true" --locked="false" --access-level="not_protected"

Runtime platform                                    arch=amd64 os=linux pid=7 revision=32fc1585 version=15.2.1
Running in system-mode.                            
                                                   
Registering runner... succeeded                     runner=GR1348941RLoRqn-L
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
 
Configuration (with the authentication token) was saved in "/etc/gitlab-runner/config.toml" 


$

Example output for bad token (I just deleted the runner and reset the token):

$ ./keyhacks.sh gitlab_runner_registration_token GR1348941RLoRqn-LN-ZsZHUoa23A
docker run --rm gitlab/gitlab-runner register --non-interactive --executor "docker" --docker-image alpine:latest --url "https://gitlab.com/" --registration-token "GR1348941RLoRqn-LN-ZsZHUoa23A" --description "keyhacks-test" --maintenance-note "Testing token with keyhacks" --tag-list "docker,aws" --run-untagged="true" --locked="false" --access-level="not_protected"

Runtime platform                                    arch=amd64 os=linux pid=7 revision=32fc1585 version=15.2.1
Running in system-mode.                            
                                                   
ERROR: Registering runner... forbidden (check registration token)  runner=GR1348941RLoRqn-L
PANIC: Failed to register the runner.              


$

@gwen001 gwen001 merged commit 2202c6d into gwen001:master Sep 20, 2022
@gwen001
Copy link
Owner

gwen001 commented Sep 20, 2022

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants