Skip to content

Instantly share code, notes, and snippets.

@avkosme
Created November 13, 2019 11:35
Show Gist options
  • Save avkosme/6e3f8b24759de93dd0c3839168b2bd5d to your computer and use it in GitHub Desktop.
Save avkosme/6e3f8b24759de93dd0c3839168b2bd5d to your computer and use it in GitHub Desktop.
gitlab-reset-pass.sh
#!/usr/bin/env bash
echo -n "Email: "; read MAIL
echo -n "Password: "; read -s PASS
echo # Ensure a new line
docker exec gitlab10 gitlab-rails runner -e production " \
user = User.find_by(email: '$MAIL'); \
user.password = user.password_confirmation = '$PASS'; \
user.save!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment