GitSwarm 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, gitswarm-www
by default, for the GitSwarm internal web server "Workhorse".
An operating system account, gitswarm-redis
by default, for a Redis database.
An operating system account, gitswarm-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 GitSwarm 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 GitSwarm host machine already has a Git product installed, that other Git product likely also wants to control the git
user account. In this case, GitSwarm should be configured to use a different user account for its own repo management.
GitSwarm'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 GitSwarm
INFO: configuration (git:/var/opt/gitswarm).
To solve this problem:
For new installations:
Create the file /opt/perforce/package-control/helix-gitswarm.config-overrides
with the following content:
user['username'] = 'gitswarm-git'
user['home'] = '/var/opt/gitswarm'
For existing installations:
Edit /etc/gitswarm/gitswarm.rb
to insert/update the following two lines:
user['username'] = 'gitswarm-git'
user['home'] = '/var/opt/gitswarm'
Replace gitswarm-git
with the userid you prefer to use instead of git
. Replace /var/opt/gitswarm
with the path to the home directory you prefer to use. Then install the GitSwarm package again; installation should now succeed.
Important: Making this change affects the remote configuration for every GitSwarm user. For example, if the userid is
gitswarm-git
, the remote configuration would look like[email protected]:project/repo.git
.