By Abdul Salam
I am trying to install and setup gitlab on my digital ocean server Ubuntu 22. source added in gitlab_gitlab-ce.list. when I use command:
apt install gitlab-ce -y
it showing error : E: Unable to locate package gitlab-ce using Ubuntu 22 Please help me, I tried 10 times but giving same error.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey! 👋
It looks like the GitLab repository might not be properly configured or there could be an issue with the source list for GitLab.
As per the official documentation here you need a few prerequisites and you should also not manually add the repository list.
First, install necessary dependencies:
sudo apt update
sudo apt install -y curl openssh-server ca-certificates tzdata perl
Next, download and install the GitLab repository package using the official script instead of manually adding the repository:
curl -fsSL https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
Now, try to install GitLab again:
sudo apt install gitlab-ce
For further guidance, you can also refer to the official GitLab installation docs here:
Let me know if this works or if you still run into any issues!
- Bobby
sudo rm /etc/apt/sources.list.d/gitlab_gitlab-ce.list
sudo apt update
Add the GitLab repository: Follow these steps to ensure you’re adding the correct repository for GitLab:
sudo apt-get install -y curl openssh-server ca-certificates tzdata perl
- Add the GitLab repository using the official GitLab installation method:
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
This will automatically configure the `gitlab-ce` repository and add the correct entries to your sources list for Ubuntu 22.
sudo apt install gitlab-ce -y
Troubleshooting Repository Issues:
cat /etc/apt/sources.list.d/gitlab_gitlab-ce.list
- Make sure that the correct distribution (e.g., `focal` for Ubuntu 20.04 or `jammy` for Ubuntu 22.04) is being referenced. If it’s incorrectly configured, you might need to adjust the distribution manually.
apt-cache search gitlab-ce
This command will list all available GitLab packages, and if `gitlab-ce` is missing, there might be a repository misconfiguration.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.