Skip to content

Instantly share code, notes, and snippets.

@macdja38
Created July 26, 2018 20:14
Show Gist options
  • Save macdja38/3d62d4f251bd7c46f0128bb6a9d35544 to your computer and use it in GitHub Desktop.
Save macdja38/3d62d4f251bd7c46f0128bb6a9d35544 to your computer and use it in GitHub Desktop.
Confirm gitlab email by CLI

On your gitlab server run gitlab-rails console production

Find your user via user = User.find_by(email: "[email protected]")

Optionally change the user's email with user.email = "[email protected]" Then run user.save!

Get the user's token with user.confirmation_token

https://PutYourGitlabHere/users/confirmation?confirmation_token=PutYourTokenHere

I used this to change my email on a gitlab instance without an email server.

@ScarlettSamantha
Copy link

ScarlettSamantha commented Jan 20, 2025

For me it could not find it by email. You are also able to search by eg: user = User.find_by(id: 1) this will get the root user then you can you can user.confirm() and after that user.save this solved my problem. (this will also allow you to change the default email by user.email = "[email protected]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment