Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
075f59b8
Commit
075f59b8
authored
Apr 01, 2019
by
Steve Azzopardi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add guide on how to reset runners token
parent
87f665e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
7 deletions
+47
-7
doc/raketasks/backup_restore.md
doc/raketasks/backup_restore.md
+47
-7
No files found.
doc/raketasks/backup_restore.md
View file @
075f59b8
...
@@ -848,15 +848,24 @@ including (but not restricted to):
...
@@ -848,15 +848,24 @@ including (but not restricted to):
*
[
Project mirroring
](
../workflow/repository_mirroring.md
)
*
[
Project mirroring
](
../workflow/repository_mirroring.md
)
*
[
Web hooks
](
../user/project/integrations/webhooks.md
)
*
[
Web hooks
](
../user/project/integrations/webhooks.md
)
In the case of CI/CD, variables, you might experience some weird behavior, like
In cases like CI/CD variables and Runner authentication, you might
stuck jobs or 500 errors. In that case, you can try removing contents of the
experience some unexpected behavior such as:
`ci_group_variables`
and
`ci_project_variables`
tables from the database.
-
Stuck jobs.
-
500 errors.
In this case, you are required to reset all the tokens for CI/CD variables
and Runner Authentication, which is described in more detail below. After
resetting the tokens, you should be able to visit your project and the jobs
will have started running again.
CAUTION:
**Warning:**
CAUTION:
**Warning:**
Use the following commands at your own risk, and make sure you've taken a
Use the following commands at your own risk, and make sure you've taken a
backup beforehand.
backup beforehand.
1.
Enter the Rails console:
#### Reset CI/CD variables
1.
Enter the DB console:
For Omnibus GitLab packages:
For Omnibus GitLab packages:
...
@@ -889,8 +898,39 @@ backup beforehand.
...
@@ -889,8 +898,39 @@ backup beforehand.
1.
You may need to reconfigure or restart GitLab for the changes to take
1.
You may need to reconfigure or restart GitLab for the changes to take
effect.
effect.
You should now be able to visit your project, and the jobs will start
running again.
#### Reset Runner registration tokens
1.
Enter the DB console:
For Omnibus GitLab packages:
```sh
sudo gitlab-rails dbconsole
```
For installations from source:
```sh
sudo -u git -H bundle exec rails dbconsole RAILS_ENV=production
```
1.
Clear all the tokens for projects, groups, and the whole instance:
CAUTION:
**Caution:**
The last UPDATE operation will stop the runners being able to pick up
new jobs. You must register new runners.
```sql
-- Clear project tokens
UPDATE projects SET runners_token = null, runners_token_encrypted = null;
-- Clear group tokens
UPDATE namespaces SET runners_token = null, runners_token_encrypted = null;
-- Clear instance tokens
UPDATE application_settings SET runners_registration_token_encrypted = null;
-- Clear runner tokens
UPDATE ci_runners SET token = null, token_encrypted = null;
```
A similar strategy can be employed for the remaining features - by removing the
A similar strategy can be employed for the remaining features - by removing the
data that cannot be decrypted, GitLab can be brought back into working order,
data that cannot be decrypted, GitLab can be brought back into working order,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment