Packagecloud and GitLab are extremely useful tools for developers who want to manage software repositories and push packages safely.
What Is GitLab?
GitLab is an open-source DevOps platform with tools for every stage of the software development lifecycle. Users can install and manage free versions of GitLab, making it easy for beginners and independent developers to learn how CI/CD tools work without spending any money. Most professional developers and development teams, however, will want to use GitLab’s Enterprise Edition, which offers additional features.
Sign up for a free trial to see how Packagecloud works for you!
GitLab’s Relationship With Packagecloud
The Packagecloud application that you access through the website is the platform’s cloud version. Packagecloud constantly updates the cloud version to ensure users have the latest security features in place. Updates also ensure that users can always use the latest versions of operating systems and programming languages like NPM, Debian, Java, RPM, Ruby Gems, and Python.
Cloud users host their packages in repositories on the Packagecloud domain.
GitLab is an on-prem customer of Packagecloud. Packagecloud on-prem is completely decoupled from the packagecloud.io website and runs entirely on-premises. Updates migrating the new features and new OS version support from the cloud version are released periodically and shipped as a Debian or RPM package.
Unlike the cloud version, GitLab both hosts and manages their packages on this version of Packagecloud. Packagecloud does not manage GitLab’s repositories or packages with the on-premises version.
Would you like to try Packagecloud before making any commitments? Start your free trial today!
Commonly Reported Issues With GitLab
When attempting to install repos and download packages from GitLab’s Packagecloud instance, you may run into some issues. Below we have outlined some of the commonly occurring issues and how you can resolve them. If you are unable to resolve your issues, you can also check out the Gitlab community forum for more help or contact GitLab support.
Can’t Install the Repo
When a new version of an operating system such as Debian 11 (Bullseye) is released, the Packagecloud team adds support for this distro on the cloud offering. Then, these updates are added to the on-premise offering and released to on-prem clients like GitLab who implement this update to their hosted installation of Packagecloud.
Between these updates and GitLab installing the new version, a GitLab user trying to install the ‘gitlab-ce’ or ‘gitlab-ee’ repositories on an on-premise unsupported version will likely encounter an error as below:
Unable to download repo config from: https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/config_file.list?os=LinuxMint&dist=una&source=script
This usually happens if your operating system is not supported by packagecloud.io, or this script's OS detection failed.
In this instance, you can force the installation of the repository by following these steps:
1. Download the installation script:
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh > script.sh
2. Make the script executable:
chmod 755 script.sh
3. Force the OS/Distro by specifying an on-premise supported dist:
os=LinuxMint dist=ulyssa ./script.sh
You can find a list of supported operating systems and distributions at: https://packagecloud.io/docs#os_distro_version
Can’t Find Old Packages
Packagecloud does not host nor manage GitLab’s repositories and packages so beyond what is currently uploaded in their repositories (presently 9.5.9 and later), we unfortunately cannot assist in finding or sharing GitLab’s packages.
If you encounter a problem, your best option is to contact GitLab for support. You might also find helpful information on GitLab’s community forum.
“Mirror Sync in Progress” Error Message
When Gitlab uploads new packages, the repository will undergo indexing. The time required to complete the indexing is directly proportional to the number of packages hosted in the repo. Therefore depending on how many packages are in the repository, the time required to complete indexing will vary.
During this time, someone might attempt to mirror GitLab, resulting in an error that looks like:
Err:7 http://gitlabaptreposerver/gitlab bionic/main amd64 Packages File has unexpected size (66916 != 66630). Mirror sync in progress?
If this happens, you can view the repository via the user interface (UI) to see if any packages are currently being indexed.
Gitlab Community Edition (gitlab-ce) repository: https://packages.gitlab.com/gitlab/gitlab-ce
Gitlab Enterprise Edition (gitlab-ee) repository: https://packages.gitlab.com/gitlab/gitlab-ee
If you find that they are, the problem could resolve itself. Wait a few minutes and try again.
It doesn’t happen often, but indexing can get “stuck” and you may see the “indexing” label for a couple of hours or longer. If that happens, contact GitLab or seek support on the community forum.
How Packagecloud Can Help
Packagecloud is a service designed to distribute software packages to all of the machines in your IT ecosystem. It takes an agnostic approach that doesn’t force you to use a specific programming language or operating system. Like GitLab running Packagecloud on-premise, see how you might benefit by starting a free trial with Packagecloud and experiencing its features.