Configuring GitLab Using the UI
local graph
Chapter 3 — Configuring GitLab Using the UI
Section titled “Chapter 3 — Configuring GitLab Using the UI”After installing GitLab in the previous chapter, you probably have a running instance. But how can you manage it? You need to know how to configure the software. This chapter will explain how this is achieved for the different kinds of GitLab installations that are available.
The following topics will be covered in this chapter:
- Configuring GitLab settings at the instance level
- Configuring GitLab settings at the group level
- Configuring GitLab settings at the project level
To manage omnibus installs, you need to use a central configuration file called gitlab.rb. You need to create it yourself or copy an example of one. A template of this configuration file is available at https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template. Please note that it isn’t updated after upgrades. We will quote and discuss parts of this file in this chapter.
To follow along with the instructions in this chapter, please download this book’s GitHub repository, along with the examples that are available, at https://github.com/PacktPublishing/Mastering-GitLab-12/tree/master/Chapter03.
When you log on to GitLab as an administrator, you will notice a tool icon in the top right of the menu:

When you click on that, the administrator page will load, which you can use to access instance-level settings. The base page provides an overview of active projects, users, and groups:

On the left-hand side, there are several global administration options. Let’s go through them.
The options are grouped, and some items can even be expanded:
- Dashboard: Dashboard gives you some insight into the number of projects, users, and groups that are in your GitLab instance. You can create new ones from this screen. There is also other interesting information in the form of statistics, where you can get an overview of active features and installed components. If you enabled exposing instance information to GitLab, it will also mention whether you should upgrade your instance to a newer version of GitLab.
- Projects: In the Projects pane, you can search for projects and create new ones. For the search option, there are some filters available.
- Users: The Users pane offers the same functionality as the Projects pane, that is, searching for users with advanced filtering and being able to create new users.
- Groups: The Groups pane is identical to the previous panes in terms of its features, but without fancy filters.
- Jobs: The Jobs pane offers you insight into continuous integration/continuous deployment (CI/CD) jobs that are pending, running, or finished.
- Runners: In this section of the administration page, options and views on CI/CD GitLab runners are available.
- Gitaly servers: By default, there is only one Gitaly server, and it is shown here. However, there could be more, depending on your setup.
The monitoring section offers interesting bits of information that are needed so that you can administer your GitLab instance:
- System information: CPU, memory, and other metrics.
- Background Jobs: GitLab integrated the Sidekiq statistics gem into the application, and it can be viewed here.
- Logs: In this section, you can view 2,000 lines of information from the most important GitLab log files (unicorn, gitlab-shell, Sidekiq, and so on).
- Health check: This is a very interesting page for sysadmins. Here, you will find endpoints that will give some insight into the health of the running GitLab instance. There is also a token present, which you will need to send as a parameter if your monitoring software wants to scrape the page.
- Requests Profiles: This is only interesting to developers or testers. Here, you can send a header to GitLab for use in request profiling.
- Audit Log: If you have an enterprise license, you can find audit events here and filter them.
Your GitLab instance has a facility where you can send messages to all of your users. These broadcasts can come in handy if you want to inform your users about system-wide events, such as upgrades and scheduled downtime. The following is the Admin page, which you can find in the side menu:

After you’ve scheduled a new message, it can be reused later as well:

GitLab can perform HTTP POST requests on the system level and act on several events.
A standard event is raised when you’re creating a new project or user. Additionally, it can send other types of events as well. Just add a destination URL and (optionally) a secret token:

When you have configured your system hook, there is a drop-down list with a test to check whether it works by calling the URL.
On this page, you also have the option to configure installed plugins. This basically fires a locally installed program instead of calling a URL with parameters.
It requires you to place the plugin code in /opt/gitlab/embedded/service/gitlab-rails/plugins, and it has to be written in a certain way. After installation, the plugin can be run as a hook.
In this section of the administration page, you have the option to register third-party applications in order to use GitLab as an OAuth authorization provider.
Open Authorization (OAuth) is an open standard for authorization. Users can give a program or website access to their private data that’s kept on another website without revealing their username and password.
To register an application, you need to provide a name, callback URL, and set a few options.
Trusted means that a token is exchanged based on the already validated resource owner’s credentials. The user authorization step is subsequently skipped for this application when it’s used.
Some other scopes are also defined that allow a given application to perform various actions. These are as follows:
- API: Grants complete read and write access to the API, including all groups and projects.
- read_user: Grants read-only access to the authenticated user’s profile through the /user API endpoint, which includes username, public email, and full name. It also grants access to read-only API endpoints under /users.
- sudo: Grants permission to perform API actions as any user in the system when authenticated as an admin user.
- read_repository: Grants read-only access to repositories on private projects using Git over HTTP (not using the API).
- openid: Grants permission to authenticate with GitLab using OpenID Connect. It also gives read-only access to the user’s profile and group memberships.
You can also revoke registration if you wish to. GitLab uses doorkeeper-gem, which can be found at https://github.com/doorkeeper-gem/doorkeeper, to provide this functionality.
There are several places in the GitLab web interface where, as a user, you can file and report abuse. You can find buttons to file a report in the following sections: