rbpi:gitlab

GIT server with GitLab on RBPI

How to install GitLab on the Raspberry Pi

Installing GitLab on the Raspberry Pi is very simple. Here we will perform an installation for Raspbian.

At first we will install all the software that can be useful to GitLab or its installation. To do this, run the following command:

sudo apt install curl openssh-server ca-certificates postfix apt-transport-https

This command will (amoung other things) install the “postfix” software. When installing it, be sure to choose the “Website” option.

Once installed, we will now add the GitLab repository to Raspbian in order to manage software updates more easily.

For that, we will start by adding the keys of the deposit then we will add the deposit as such. To do this, run the following commands:

curl https://packages.gitlab.com/gpg.key | sudo apt-key add -
sudo curl -o /etc/apt/sources.list.d/gitlab_ce.list "https://packages.gitlab.com/install/repositories/gitlab/raspberry-pi2/config_file.list?os=debian&dist=jessie" && sudo apt-get update

Once done, we will be able to install GitLab (Community Edition) and configure it. To do this, run the following command:

sudo apt-get install gitlab-ce
sudo gitlab-ctl reconfigure

All you have to do is connect to the address of your Raspberry Pi from your browser and complete the configuration. By default the login is “root”.

In order for GitLab to display correct repository clone links to your users it needs to know the URL under which it is reached by your users, e.g. http://gitlab.example.com. Add or edit the following line in /etc/gitlab/gitlab.rb:

external_url "http://gitlab.example.com"

Run sudo gitlab-ctl reconfigure for the change to take effect

sudo gitlab-ctl reconfigure
  • rbpi/gitlab.txt
  • Last modified: 2019/10/31 08:55
  • by 127.0.0.1