You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
similar to previous (solved) issue but the fix proposed there does not fix here nor does the instructions found on https://github.com/cli/cli#installation as seen below
deinstalling then reinstalling also does not fix
thanks for your help
$ (type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
Hit:2 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease
Ign:3 https://cli.github.com/packages jammy InRelease
Hit:4 https://download.docker.com/linux/ubuntu focal InRelease
Hit:5 https://packages.wazuh.com/4.x/apt stable InRelease
Hit:6 https://cli.github.com/packages stable InRelease
Err:7 https://cli.github.com/packages jammy Release
404 Not Found [IP: 185.199.111.153 443]
Hit:8 https://packages.cloud.google.com/apt cloud-sdk InRelease
Hit:1 https://packages.icinga.com/ubuntu icinga-focal InRelease
Hit:9 http://apt.puppetlabs.com stretch InRelease
Hit:10 http://be.archive.ubuntu.com/ubuntu jammy InRelease
Hit:11 http://be.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:13 http://be.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:14 http://be.archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:12 https://linux.dell.com/repo/community/openmanage/950/focal focal InRelease
Reading package lists... Done
E: The repository 'https://cli.github.com/packages jammy 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.
The files are missing on my system @williammartin. cat: /etc/apt/sources.list.d/github-cli.list: No such file or directory
Instead I have the following files,
$ ls /etc/apt/sources.list.d/
archive_uri-https_cli_github_com_packages-noble.list
ubuntu.sources
$ cat /etc/apt/sources.list.d/archive_uri-https_cli_github_com_packages-noble.list
deb https://cli.github.com/packages noble main
# deb-src https://cli.github.com/packages noble main
I am using Ubuntu 24.04.2
$ gh --version
gh version 2.45.0 (2024-11-01 Ubuntu 2.45.0-1ubuntu0.2)
https://github.com/cli/cli/releases/tag/v2.45.0
I suspect the answer is that there are some leftover list files and if you had a look in sudo nano /etc/apt/sources.list.d/github-cli.list or /etc/apt/sources.list.d/github-cli*.list.d/*jammy*.list you would find that you need to remove jammy (or noble) and replace with stable. Just a hunch though.
Very sorry for the late response. I uninstalled gh-cli, deleted old files in sources.list.d and tried installing from the page you gave, and now I do not get the error message on sudo apt update.
Though I feel like I followed the instructions on that page when I installed gh-cli for the first time, I am unsure what could have changed this time.
Activity
[-]apt fails to check gh repo[/-][+]apt fails to check gh cli repo[/+]edelmoral commentedon Sep 7, 2024
I am in Venezuela and https://cli.github.com isn't accesible from here. My issue was solved by using a VPN.
davhdavh commentedon Oct 11, 2024
for anyone else that gets this error, you can install latest via:
williammartin commentedon Dec 2, 2024
I'm not really sure why your lookup is going to:
As per our installation instructions and your command, it should be looking for
stable:We don't ship a jammy release for reasons that were mentioned here: #5523 (comment)
You might want to:
And have a look to see that there isn't any mention of jammy in there.
ShwetanshSingh commentedon Jun 27, 2025
The files are missing on my system @williammartin.
cat: /etc/apt/sources.list.d/github-cli.list: No such file or directoryInstead I have the following files,
I am using Ubuntu
24.04.2Can I provide any more information?
williammartin commentedon Jun 27, 2025
You have
2.45.0because that's the version of noble that ubuntu ships by default I'd guess: https://launchpad.net/ubuntu/noble/+source/ghI'm not sure what you need to do to reorder priorities. I would expect that the instructions https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt would work. Can you share the output when you try those commands?
williammartin commentedon Jun 27, 2025
I suspect the answer is that there are some leftover list files and if you had a look in
sudo nano /etc/apt/sources.list.d/github-cli.listor/etc/apt/sources.list.d/github-cli*.list.d/*jammy*.listyou would find that you need to remove jammy (or noble) and replace withstable. Just a hunch though.ShwetanshSingh commentedon Jul 7, 2025
Very sorry for the late response. I uninstalled gh-cli, deleted old files in sources.list.d and tried installing from the page you gave, and now I do not get the error message on sudo apt update.
Though I feel like I followed the instructions on that page when I installed gh-cli for the first time, I am unsure what could have changed this time.
But the issue is resolved on my side. Thank you
williammartin commentedon Jul 7, 2025
Thanks for letting me know. I'm going to close this because the original author has not been responding and it's almost certainly not a bug.
docs: Add step to install working version on Ubuntu Pro