Gitlab CE still asking to change password after reset

We have freshly installed Gitlab CE on CentOS 8. Its’ asking to change password in accessing GitLab instance in browser. As part of automation installation of GitLab CE, we don’t want change password in browser. So we tried to change root password through rest api and get 200 reponse code.

PUT /api/v4/users/1 where 1 is ID of root user.

When trying to access gitlab instance in browser after successfully resetting root password, it is still asking to change password.

My question is

  • Through REST API, how do I reset root password after fresh deployment of GitLAb instance? We would like to use new password passed in rest api as root logging password.


GitLab (the company) has very little understanding for the need to completely automate installation (that’s my feeling at least). How do you access the API on a fresh install (just curious because I failed when I tried)?
What we have gone with is using the rails runner to define an API token for root, see:

With that token we can create all the users we need, and even give instance administrator rights to some (to get the warning that our license is about to expire once a year, a couple of us have administrator rights on our main accounts, even though that is against the principle of least privilege). Even though it’s rarely used it’s still wise not to have the default password on the root account, but that is easier.
offers a way to do it.
Setting that environment variable and ruuning gitlab-ctl reconfigure also seems to do it, and you can of course also do it through the rails runner, see e.g. the answer of