2

So I have a raspberry pi that I am trying to setup as a Gitlab server on my LAN at home.

I also have an install of gitlab that I have been running on one of my machines on my LAN which has historical data in it. Call this gitlab "Instance A". Let's call the one on the pi "Instance B"

I would like to migrate the data from my Instance A to Instance B, but gitlab has a very strict rule that states that when migrating from one server instance to another, the gitlab versions must be an -exact- match. (See here). This is very annoying because the latest Raspbian gitlab package is stuck at 8.7.9, but "Instance A" stays up to date with the Debian distros, so it is at version 8.12.3. Gitlab refuses to restore if the versions mismatch.

I am very nervous to start messing with the "Instance A" gitlab install, in case I screw it up and delete all my data. So downgrading "Instance A" version isn't my preferred path. Not even sure how to do it, or even if gitlab will properly retain all my data when downgrading.

So it seems that I somehow need to get gitlab version 8.12.3 onto my pi. How do I do this? Is building from source my only option? I hope not, because the docs star with warnings about how hard and error prone it is to do that. (See here).

  • 1
    I'm not confident enough in this to post it as an answer (given that you run the risk of losing all your data), but there do seem to be some comments on the gitlab homepage that suggest 'changing the source for apt packages to debian instead of current raspberrian [sic] path' as a viable upgrade route. – goobering Feb 12 '17 at 11:58
  • @goobering: thanks, your link helped lead me down the right path. I posted how I solved it below. – rothloup Feb 21 '17 at 12:52
3

In case anyone else runs into this issue, I'll post how I solved it. Thanks to goobering for the link to comments on the gitlab homepage, that helped a lot.

The Raspbian distro is stuck at the version listed in the original question, and will remain so as long as the maintainers don't update the repository. However, raspbian is essentially derived from Debian, just a lighter version that is stripped down to work on an Rpi and with some programs replaced with Rpi-friendly ones.

So the solution is to just tell apt-get to go to the latest debian repository, then tell apt-get to use the version you need.

Change /etc/apt/sources like this:

# The commented line below is the original source
# deb https://packages.gitlab.com/gitlab/raspberry-pi2/ jessie main contrib non-free rpi 
# The line below is the debian source of the same release "jessie"
deb https://packages.gitlab.com/gitlab/raspberry-pi2/debian jessie main contrib non-free rpi

then run an apt-get update to refresh the repository

#sudo apt-get update

then install the gitlab-ce version that you need:

#sudo apt-get install gitlab-ce=<version>

The string to use for version can be viewed by looking at the output of the following command:

#sudo apt-cache policy gitlab-ce

The output will list all of the available versions. The output of each version is formatted as followed by a number (always 0 in my case,not sure what the number means) followed by the repository source on the next line. If you have a version currently installed, it will have a "***" listed in the left margin. Here is how it looks in my case:

     8.12.6-ce.0 0
    500 https://packages.gitlab.com/gitlab/raspberry-pi2/debian/ jessie/main armhf Packages
     8.12.5-ce.0 0
    500 https://packages.gitlab.com/gitlab/raspberry-pi2/debian/ jessie/main armhf Packages
     8.12.4-ce.0 0
    500 https://packages.gitlab.com/gitlab/raspberry-pi2/debian/ jessie/main armhf Packages
  *** 8.12.3-ce.0 0
    500 https://packages.gitlab.com/gitlab/raspberry-pi2/debian/ jessie/main armhf Packages
    100 /var/lib/dpkg/status
     8.12.2-ce.0 0
    500 https://packages.gitlab.com/gitlab/raspberry-pi2/debian/ jessie/main armhf Packages
     8.12.1-ce.0 0
    500 https://packages.gitlab.com/gitlab/raspberry-pi2/debian/ jessie/main armhf Packages
     8.12.0-rc6.ce.0 0
    500 https://packages.gitlab.com/gitlab/raspberry-pi2/debian/ jessie/main armhf Packages

As you can see, I have version 8.12.3-ce.0 installed. so the complete installation command for me was

sudo apt-get install gitlab-ce=8.12.3-ce.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.