I decided that I wanted to enhance my understanding of git this weekend by setting up a basic Gitlab server for my house. My hardware is a Pi3 running a brand new install of Raspbian-stretch-lite-cli 4-18-2018. After installing that and enabling SSH in the raspi-config settings, I began my install.
Installing a few of the packages that Gitlab depends on to run on first:
sudo apt-get update sudo apt-get install ca-certificates curl openssh-server postfix
This will take you into a few prompts to configure Postfix. I chose ‘Local Only’ for ‘general type of mail configuration’ dialog. Then named the system mail something like ‘pi3’
Next the GPG Keys to encrypt and sign data with Gitlab’s servers.
curl https://packages.gitlab.com/gpg.key | sudo apt-key add -
Finally time to install the Gitlab package:
curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash sudo apt-get install gitlab-ce sudo gitlab-ctl reconfigure
I’ve had the script fail on me before, so if that does you can download the .deb and run dkpkg on it and install that way as well. Make sure to run that reconfigure control command if you do so.
There are extra config steps to further configure your URL and other settings which Gitlab outlines here: https://docs.gitlab.com/omnibus/README.html#installation-and-configuration-using-omnibus-package
With this basic configuration you just need to punch in your Pi’s IP address and you will come up with the Gitlab login page. Login with ‘root’ Gitlab will walk you through the rest, and then create your first project.
Sitting idle the whole thing is not too heavy on the resources as the picture below shows. My kids were streaming a 2GB video file off the PI’s main memory via an SMB share as well.