GitLab uses a minimum of four, and up to six, different userids during its operation:
An operating system account, git by default, for repo management and access.
An operating system account, gitlab-www by default, for the GitLab internal web server "Workhorse".
An operating system account, gitlab-redis by default, for a Redis database.
An operating system account, gitlab-psql by default, for a PostgreSQL database.
An operating system account, git-fusion by default, for Helix Git Fusion. Multiple Git Fusion instances can exist on the same host; there would be a separate user account per Git Fusion instance, which would be manually configured.
(Optional) To create GitLab projects based on directories stored in the Helix Versioning Engine (p4d), a p4d userid is required. Often, this userid would match the one that Git Fusion uses, but could be different if you need to apply different protections.
If the intended GitLab host machine already has a Git product installed, that other Git product likely also wants to control the git user account. In this case, GitLab should be configured to use a different user account for its own repo management.
GitLab's package installation automatically detects the existence of the git userid; if this situation exists you would see a notice similar to the following:
INFO: User check result (git:/home/git) does not match your GitLab
INFO: configuration (git:/var/opt/gitlab).
To solve this problem:
For new installations:
Create the file /opt/perforce/package-control/helix-gitswarm.config-overrides with the following content:
user['username'] = 'gitlab-git'
user['home'] = '/var/opt/gitlab'For existing installations:
Edit /etc/gitlab/gitlab.rb to insert/update the following two lines:
user['username'] = 'gitlab-git'
user['home'] = '/var/opt/gitlab'Replace gitlab-git with the userid you prefer to use instead of git. Replace /var/opt/gitlab with the path to the home directory you prefer to use. Then install the GitLab package again; installation should now succeed.
Important: Making this change affects the remote configuration for every GitLab user. For example, if the userid is
gitlab-git, the remote configuration would look likegitlab-git@gitlab.host:project/repo.git.