Logging in for the first time
When you have installed your server, you need to log in. GitLab comes with a built-in administrator account.
How to do it…
In this recipe, we will log in and create our own administrator account as follows:
- Go to your domain where GitLab is installed (that is,
gitlab.example.com
). - Log in using the username
root
and password5iveL!fe
. - You need to choose a new password; pick whatever you like.
- Log in with the new information.
- Go to the Admin area section, as shown in the following screenshot:
- Navigate to Users | New User.
- Fill in the information to create your own user. Don't forget to check the Admin checkbox.
- Now, click on Create user.
An e-mail will be sent to the given e-mail address. This e-mail will contain the new password for this account.
- Log out from GitLab and log in with your new account.
- You need to choose a new password and log in again.
- Go to the Admin area section and click on Users.
- Click on Block for the administrator account.
How it works…
As GitLab ships with a default administrator account, this makes it a bit unsecure by default. Therefore, when you don't change anything about your setup, everyone will be able to log in.
To ensure that we have a secure GitLab installation, we created a new administrator account, and gave it an administrator access. We also want to be sure that the default shipped account is not useable anymore, so that's why we logged in with our own account and disabled the account given by GitLab.
We had to log out first, as GitLab does not allow us to disable the account that is currently logged in.