I'm running my Gitlab with Docker and I forgot my Gitlab root password. How to change it ?
I found a way to make it work. First connect to your Gitlab with command line
search for your Docker CONTAINER_ID
docker ps -all
eg
docker exec -it d0bbe0e1e3db bash
<-- with your CONTAINER_ID
$ gitlab-rails console -e production
user = User.where(id: 1).first
user.password = 'your secret'
user.password_confirmation = 'your secret'
user.save
exit
The new-ish hotness to change Gitlab's "root" account's password is this:
gitlab-rake "gitlab:password:reset[root]"
And if you're running Gitlab inside a Docker container, then use this from the host (you may have to "sudo" this depending on your situation):
docker exec -it gitlab gitlab-rake "gitlab:password:reset[root]"
This assumes that you named your Gitlab container "gitlab". And be patient; don't be surprised if it takes more than a few seconds before the "Enter password:" prompt shows up.
I leave a tutorial updated to the new version. In my case it is for a Gitlab installation on a Synology.
Translate (Spanish -> English ) https://translate.google.com/translate?sl=es&tl=en&u=https://www.vicolinker.net/synology-gitlab-reset-root-password/
Original (Spanish) https://www.vicolinker.net/synology-gitlab-reset-root-password/
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