Packages downloaded from https://cli.github.com or from https://github.com/cli/cli/releases
are considered official binaries. We focus on popular Linux distros and
the following CPU architectures: i386
, amd64
, arm64
.
Other sources for installation are community-maintained and thus might lag behind our release schedule.
If none of our official binaries, packages, repositories, nor community sources work for you, we recommend using our Makefile
to build gh
from source. It's quick and easy.
Install:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
sudo apt-add-repository https://cli.github.com/packages
sudo apt update
sudo apt install gh
Note: If you are behind a firewall, the connection to keyserver.ubuntu.com
might fail. In that case, try running sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C99B11DEB97541F0
.
Note: If you get "gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory" error, try installing the dirmngr
package. Run sudo apt-get install dirmngr
and repeat the steps above.
Note: most systems will have apt-add-repository
already. If you get a command not found
error, try running sudo apt install software-properties-common
and trying these steps again.
Upgrade:
sudo apt update
sudo apt install gh
Install:
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
sudo dnf install gh
Upgrade:
sudo dnf update gh
Install:
sudo zypper addrepo https://cli.github.com/packages/rpm/gh-cli.repo
sudo zypper ref
sudo zypper install gh
Upgrade:
sudo zypper ref
sudo zypper update gh
- Download release binaries that match your platform; or
- Build from source.
Install and upgrade:
- Download the
.rpm
file from the releases page; - Install the downloaded file:
sudo zypper in gh_*_linux_amd64.rpm
Our team does not directly maintain the following packages or repositories. They are unofficial and we are unable to provide support or guarantees for them.
Arch Linux users can install from the community repo:
sudo pacman -S github-cli
Android users can install via Termux:
pkg install gh
Kiss Linux users can install from the community repos:
kiss b github-cli && kiss i github-cli
Nix/NixOS users can install from nixpkgs:
nix-env -iA nixos.gitAndTools.gh