Repository navigation
Update installation instructions for Linux #4634
Description
Activity
- addedpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
on Oct 29, 2021 I still get the error, even with the updated snippet debian in windows+ws2
I was having this problem, but the issue was that curl wasn't installed. Then the official docs worked great for me.
Reacted by Leonardo Asad, Hvr1zz, Janto Dreijer and anupamReacted by Hussam Hassan, Mitchell P. Krawiec-Thayer and anupamfor me the following worked.
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg --output /usr/share/keyrings/githubcli-archive-keyring.gpg sudo gpg --dearmor /usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/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 chmod 644 /usr/share/keyrings/githubcli-archive-keyring.gpg sudo chmod 644 /etc/apt/sources.list.d/github-cli.list sudo apt update sudo apt install ghsys info
$ cat /etc/os-release NAME="Linux Mint" VERSION="20.3 (Una)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 20.3" VERSION_ID="20.3" HOME_URL="https://www.linuxmint.com/" SUPPORT_URL="https://forums.linuxmint.com/" BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/" PRIVACY_POLICY_URL="https://www.linuxmint.com/" VERSION_CODENAME=una UBUNTU_CODENAME=focalReacted by Rafael Sales, Tony Homer, Graham Smith, ivngmz2018 and Alen MašićReacted by Tony Homeri have still the same error; tried both of your snippets though.
I'm running debian 10 in wsl2, gpg is installed.for me the following worked.
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg --output /usr/share/keyrings/githubcli-archive-keyring.gpg sudo gpg --dearmor /usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/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 chmod 644 /usr/share/keyrings/githubcli-archive-keyring.gpg sudo chmod 644 /etc/apt/sources.list.d/github-cli.list sudo apt update sudo apt install ghsys info
$ cat /etc/os-release NAME="Linux Mint" VERSION="20.3 (Una)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 20.3" VERSION_ID="20.3" HOME_URL="https://www.linuxmint.com/" SUPPORT_URL="https://forums.linuxmint.com/" BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/" PRIVACY_POLICY_URL="https://www.linuxmint.com/" VERSION_CODENAME=una UBUNTU_CODENAME=focalworked like a charm... thanks for the solution buddy..!
@orvisevans You can bold curl, as I missed that. :)
https://github.com/cli/cli/blob/trunk/docs/install_linux.md
The umask on my system results in new files with 600 permission. With this permission on /usr/share/keyrings/githubcli-archive-keyring.gpg, running
sudo apt updatefails:W: GPG error: https://cli.github.com/packages stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C99B11DEB97541F0 E: The repository 'https://cli.github.com/packages stable InRelease' is not signed. 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.Recommend updating documentation to:
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/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 chmod 644 /usr/share/keyrings/githubcli-archive-keyring.gpg sudo chmod 644 /etc/apt/sources.list.d/github-cli.list sudo apt update sudo apt install gh
This solve my problem! Tnx
Reacted by Vinicus Ianni, Angelica Gardner and Kota SekiWorked for me as well. Many thanks!
This was fixed in #5844; forgot to close. Thanks everyone!
I was having this problem, but the issue was that curl wasn't installed. Then the official docs worked great for me.
This was my problem too and the terminal didn't show "Command 'curl' not found". Ubuntu new releases don't provide curl command, instead you can download it, but this is not necessary. All you need is download the file githubcli-archive-keyring.gpg from: [https://cli.github.com/packages/githubcli-archive-keyring.gpg] or from a keyserver, and then move it to the directory /usr/share/keyrings/ This directory had an empty file with the same name (cause curl din't download anything). The "sources.list" is configured fine for this path so you should avoid change file name.
I know the issue is closed but I wanted comment to try help anyone with this same issue (Google doesn't have much info and is plenty of deprecated solutions like the use of apt-key command). Sorry if this is not the proper manner I'm a little bit newbie github user.@KatiaGonGon Thanks for the tip! We'll try to amend our installation documentation to account for the fact that
curlmight not be present on the system. I did not know that Ubuntu stopped shipping curl by default. 🙇curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg --output /usr/share/keyrings/githubcli-archive-keyring.gpg
sudo gpg --dearmor /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/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 chmod 644 /usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod 644 /etc/apt/sources.list.d/github-cli.list
sudo apt update
sudo apt install ghthis worked for me, thanks.
(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
https://github.com/cli/cli/blob/trunk/docs/install_linux.md
The umask on my system results in new files with 600 permission. With this permission on /usr/share/keyrings/githubcli-archive-keyring.gpg, running
sudo apt updatefails:Recommend updating documentation to: