Change Gitlab password

30 Jan 2022 / Oscar F
RaspberryPi with Gitlab logo

There's two alternative ways.

Both alternatives requires terminal or ssh to the server.

Alternative 1

Tested by me on a Raspberry Pi.

gitlab-rails console production
user = User.where(id: 1).first
user.password = 'your secret'
user.password_confirmation = 'your secret'
user.save
exit

You can read about how to setup GitLab on a Raspberry Pi here.

Alternative 2

The official docs way.

gitlab-rake "gitlab:password:reset[root]"

References:

Alternative 1: https://stackoverflow.com/questions/55747402/docker-gitlab-change-forgotten-root-password

Alternative 2: https://docs.gitlab.com/ee/security/reset_user_password.html