dockergitlabrootchange-password

Docker Gitlab change forgotten root password


I'm running my Gitlab with Docker and I forgot my Gitlab root password. How to change it ?


Solution

  • 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.

    enter image description here

    docker exec -it d0bbe0e1e3db bash <-- with your CONTAINER_ID

    $ gitlab-rails console -e production

    enter image description here

    user = User.where(id: 1).first
    user.password = 'your secret'
    user.password_confirmation = 'your secret'
    user.save
    exit