Install gitlab-ce on ubuntu server 17.04
Asked Answered
R

3

11

I'm trying to install the gitlab-ce package on a system running Ubuntu server 17.04. I followed the official installation instructions here.

First I ran:

sudo apt-get install curl openssh-server ca-certificates postfix

I already had all of those installed. Then I ran:

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

Which also worked fine. But when I try to run

sudo apt-get install gitlab-ce

I get the following error message:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package gitlab-ce

I know it's possible to install gitlab on Ubuntu server 17.04, since I had already done It on a previous installation. Unfortunately I installed the OS again from scratch and I can't remember how I had installed gitlab.

Thanks for any help in advance!

Raddy answered 25/6, 2017 at 21:37 Comment(0)
G
20

I gave up with the "full" automated script, as it doesn't appear to be working with 17.04... Anyway. I grabbed the latest package from https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_9.3.0-ce.0_amd64.deb

curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_9.3.0-ce.0_amd64.deb/download

Installed it with the package manager

sudo dpkg -i gitlab-ce_9.3.0-ce.0_amd64.deb

Then configured it with

sudo gitlab-ctl reconfigure

Then, point your web browser at your new gitlab install and you should be good to go...

Ubuntu 20.04.1

Incase anyone bumps back into this, while trying to gitlab on version 20.0.4 of ubuntu, life is much easier... and the instructions and automated script actually work. GitLab-CE installation instructions

on a fresh install of ubuntu: -

sudo apt install curl
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab- ce/script.deb.sh | sudo bash
sudo apt install gitlab-ce

done!

Genus answered 25/6, 2017 at 23:38 Comment(1)
I also tried manually installing it, but I used a different file, which didntn't seem to work... Anyways, thanks for your help, this works!Raddy
F
10

I was facing the same problem (Lubuntu 17.10), after searching the gitlab forums for 2 Hours, I found this thread. So from what I have read: Gitlab-ce is not supported for zesty yet. Also the simple

sudo apt-get install gitlab

is a wrong prompt cause it installs a Ubuntu package created by a user named as "praveen" and It is not officially supported by Gitlab.

here is what I did To solve my problem:

sudo nano /etc/apt/sources.list.d/gitlab_gitlab-ce.list.save
sudo nano /etc/apt/sources.list.d/gitlab_gitlab-ce.list

replace "zesty" with "xenial" (These files are root access only)

sudo apt update
sudo apt-get install gitlab-ce

This worked for me. I have spent my whole afternoon for solving this problem, I hope this solution works for you too.

Prost !

EDIT: corrected spelling

Filipe answered 5/9, 2017 at 14:49 Comment(3)
In my case /etc/apt/sources.list.d/gitlab_gitlab-ce.list could not been created somehow. Maybe because I am behind a proxy. I checked the script and added the file with the content of the following page: https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.list?os=Ubuntu&dist=zesty&source=script. Finally changing zesty to xenial made i possible to install GitLab with apt.Maidy
I changed from "artful" to "xenial" and it worked. I'm using Ubuntu 17.Inherent
I succeeded by changing "cosmic" to "bionic".Calefacient
R
7

I had the same problem getting the install to run on 17.10. According to an issue on their site ( https://gitlab.com/gitlab-org/gitlab-runner/issues/2851 ), the artful packages are not being built.

I did the same this as @DevX, but just changed the parameters on their setup script.

Howler@GitLab:/tmp$ curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh

Howler@GitLab:/tmp$ sudo os=ubuntu dist=xenial bash ./script.deb.sh

Howler@GitLab:/tmp$ sudo apt-get install gitlab-ce

Raye answered 3/2, 2018 at 17:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.