How to login for the first time, local install with docker image

I installed docker image and started it.
Then I opened “external_url” in the browser and saw the login screen and I have no idea how to log in.
I was reading the docs, reproducing the steps, but suddenly - there’s a big gap on what to do right after installation.
I also searched Google on this problem but honestly found nothing applicable. Specifically, there’s a book by 2014 called “GitLab Cookbook” and there they say to login as root with password “5iveL!fe”. That doesn’t work anymore.

Could you please enlighten me?
Is there maybe some better version of the docs?
It’s a little frustrating to stumble upon such a silly issue right away.
There could be some one-pager tips on what to do, called “Quick start” I believe.

I’ve not done this myself, but I think these are the docs you are looking for

Those are the docs which I was reading, yeah. However, I cannot find the information ILF there.

Try here

I had the same problem today. Before version 14, the first time you opened Gitlab web IF, you could set up the root password. Now that screen disappeared.

I succeeded in working around that problem by following Docker Gitlab change forgotten root password - Stack Overflow.

Thank you Alex! It worked.
So after a clean and proper installation no root-password setup appears.

I’m confused why this is still not a bug and that it persists in a major release.

@OnkelTem - we made the change to increase out of the box security, by eliminating the chance of an instance being taken over before a root password is set.

We have recently tried to make this new behavior more clear in our installation documentation, by more clearly linking out to the documentation: Installing GitLab with Omnibus packages | GitLab and updating our install page.

Edit: fixed a typo

Hi Josh.

Thank you, it really makes sense. Unfortunately that method doesn’t work.

I reinstalled Gitlab, ran it with docker for the first time, looked up for the auto-generated password in the /etc/gitlab/initial_root_password and tried to use it for the root login.

This action failed with this message:

Any ideas?

I suggest resetting the root password: How to reset user password | GitLab

Thank you Ian!

Well, you will laugh, but after changing the password I saw the same 422 “The change you requested was rejected.”. So I went into the Chrome’s Incognito mode and tried there and it worked. So now I think the problem could be not related to the password at all.
Gonna reinstall GitLab again and try with pre-generated password by the @joshlambert 's reference.

1 Like

Replying to myself. That was not a password issue. The generated one worked well. It was something with the front-end caching or the wrong session data like cookies idk.

1 Like

Strange, mine works OK in Chrome. Maybe a plugin/add-on messing with it? Maybe why incognito works when the plugins/add-ons are not enabled to interfere?

Very strange, yeah. I deleted all the cookies, and now try to create the first user. Buy after I submit the Register form, it continues to redirect me to that 422 page. Will investigate it.

It’s a joke. I disabled all the extensions, cleared all possible caches, stored things, and restarted Chrome for several times. Nothing seems to work. Every time I post the user register form, I get redirected to the 422 page. But in the incognito mode it doesn’t happen. I have no idea wtf.

Here are some details of the POST request:

Ok, I’m gonna open a new issue or find an existing since it’s not really related.

Could be something unique to chrome, does it happen in Firefox? At least that way we can rule out your install if a different browser works. Obviously better to utilise Firefox, since other browsers can be based on Chrome, eg: Edge, Brave, etc.

I could finally resolve the issue by upgrading GitLab docker image.

Don’t know if it’s related, but I noticed that on the previous version (a two weeks old one?) there were some errors in the log on some auth token. Unfortunately I didn’t get a chance to save the exact message. Then I decided to update the image.
After that and reinstalling everything from scratch, I don’t get that 422 bs page anymore.
What a mess…

1 Like