Unable to install gitlab

I am getting missing “Release file” in gitlab-ee repository when tried to update dependencies, would really appreciate for any workaround suggestions. Thanks.

$ sudo apt-get update
Ign:2 https://pkg.duosecurity.com/Ubuntu focal InRelease
Ign:1 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal InRelease
Hit:3 https://pkg.duosecurity.com/Ubuntu focal Release
Hit:4 Index of /ubuntu focal InRelease
Hit:6 Index of /ubuntu focal-updates InRelease
Err:5 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal Release
Could not handshake: Error in the pull function. [IP: 13.226.220.33 443]
Get:8 Index of /ubuntu focal-backports InRelease [108 kB]
Get:9 Index of /ubuntu focal-security InRelease [114 kB]
Reading package lists… Done
E: The repository ‘https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Hello,

have you tried adding the repository using this script:

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

Yes, I did.

$ sudo curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
Detected operating system as Ubuntu/focal.
Checking for curl…
Detected curl…
Checking for gpg…
Detected gpg…
Running apt-get update… done.
Installing apt-transport-https… done.
Installing /etc/apt/sources.list.d/gitlab_gitlab-ee.list…done.
Importing packagecloud gpg key… done.
Running apt-get update… done.

The repository is setup! You can now install packages.
$ sudo apt-get update
Ign:2 https://pkg.duosecurity.com/Ubuntu focal InRelease
Ign:1 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal InRelease
Hit:3 Index of /ubuntu focal InRelease
Hit:4 https://pkg.duosecurity.com/Ubuntu focal Release
Hit:6 Index of /ubuntu focal-updates InRelease
Err:5 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal Release
Could not handshake: Error in the pull function. [IP: 13.226.220.25 443]
Hit:7 Index of /ubuntu focal-backports InRelease
Hit:8 Index of /ubuntu focal-security InRelease
Reading package lists… Done
E: The repository ‘https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

This seems to have an issue:

 Could not handshake: Error in the pull function. [IP: 13.226.220.25 443]

try doing:

apt-get clean all
apt-get update

see if the repos update properly. Seems weird that it’s not reading the repo release properly.

Same thing:

$ sudo apt-get clean all
$ sudo apt-get update
Ign:2 https://pkg.duosecurity.com/Ubuntu focal InRelease
Ign:1 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal InRelease
Hit:3 https://pkg.duosecurity.com/Ubuntu focal Release
Hit:4 Index of /ubuntu focal InRelease
Hit:6 Index of /ubuntu focal-updates InRelease
Err:5 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal Release
Could not handshake: Error in the pull function. [IP: 13.226.220.222 443]
Hit:8 Index of /ubuntu focal-backports InRelease
Hit:9 Index of /ubuntu focal-security InRelease
Reading package lists… Done
E: The repository ‘https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

What user are you running the commands as? Also, as per the documentation sudo is not used for the curl part, but only for the bash part:

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

alternatively, instead of running as a standard user, you can do this:

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

which would then run as the root user - note that now I don’t use sudo at all.

I have just tested this at my end, and this is the result:

root@ufo-build:/home/ian# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | bash
Detected operating system as Ubuntu/focal.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/gitlab_gitlab-ee.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.

The repository is setup! You can now install packages.

root@ufo-build:/home/ian# apt-get clean all

root@ufo-build:/home/ian# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-security InRelease         
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease          
Get:4 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal InRelease [23.4 kB]       
Get:5 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal/main amd64 Packages [23.3 kB]
Fetched 46.7 kB in 2s (22.6 kB/s)   
Reading package lists... Done

root@ufo-build:/home/ian# aptitude search gitlab-ee
p   gitlab-ee                          

as you can see, the repository works, which means there is something wrong with the way you are running the commands on your machine, or the problem is your server itself not downloading the correct information correctly, since the repository shows an error when running the update command. Could be a network problem, configuration problem with the network/DNS for your machine, or something like this. I cannot replicate your problem.

It was indeed a network problem, our IT group had to make a firewall policy change to finally get it work. Thanks for looking into this.

1 Like

curl | sh commands are always a bad idea, curl | sudo sh are always a very bad idea.

You have no control over what curl fetches from the net (the server might return different contents to different people and based on user-agent) and executes on your machine. Always fetch the script, read it, and execute the copy you now have locally.

@grove agreed, I generally quote and post what the Gitlab documentation says - perhaps would be better for the docs to use curl to output the script to a local file, or just use wget instead with the url. Then review the script and afterwards chmod +x scriptname to then be able to run it or bash scriptname.