Installing GitLab on Scientific Linux 6

I ran into a problem with the GitLab installation instructions on SL6. I’m a CentOS person, but they were extremely late in publishing CentOS 6. While I waited, I used SL as a stop-gap. Unfortunately I still have many SL machines I need to take care of. Here’s an explanation of the problem and what to do about it.

When the script downloads the repo for GitLab, it takes the distribution name to set up the repo. The script specifically detects scientific installations, but then it points the repo to a URL that doesn’t exist:

[root@wolverine ~]# yum install gitlab-ce
Loaded plugins: security
Setting up Install Process
No package gitlab-ce available.
Error: Nothing to do
[root@wolverine ~]#
[root@wolverine ~]# cat /etc/yum.repos.d/gitlab_gitlab-ce.repo 

Note the “scientific” portion above. This URL doesn’t exist.

To correct this problem, we need to get the correct repo config. This is the command that would have been run on CentOS 6:

curl "" > /etc/yum.repos.d/gitlab_gitlab-ce.repo

Then install the package:

[root@wolverine ~]# yum install gitlab-ce
Loaded plugins: security
Setting up Install Process
gitlab_gitlab-ce/signature                                                                                     |  836 B     00:00
gitlab_gitlab-ce/signature                                                                                     | 1.0 kB     00:00 ...
gitlab_gitlab-ce/primary                                                                                       | 533 kB     00:00
gitlab_gitlab-ce                                                                                                              174/174
gitlab_gitlab-ce-source/signature                                                                              |  836 B     00:00
gitlab_gitlab-ce-source/signature                                                                              |  951 B     00:00 ...
Resolving Dependencies
--> Running transaction check
---> Package gitlab-ce.x86_64 0:8.12.7-ce.0.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                      Arch                      Version                             Repository                           Size
 gitlab-ce                    x86_64                    8.12.7-ce.0.el6                     gitlab_gitlab-ce                    281 M

Transaction Summary
Install       1 Package(s)

Total download size: 281 M
Installed size: 748 M
Is this ok [y/N]: