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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note
We were recently forced to change our GPG signing key. If you've previously downloaded the githubcli-archive-keyring.gpg file, you should re-download it again per above instructions. If you are using a keyserver to download the key, the ID of the new key is 23F3D4EA75716059.
Upgrade:
sudo apt update
sudo apt install gh
Fedora, CentOS, Red Hat Enterprise Linux (dnf)
Install from our package repository for immediate access to latest releases:
Note
We were recently forced to change our GPG signing key. If you've added the repository previously and now you're getting a GPG signing key error, disable the repository first with sudo yum-config-manager --disable gh-cli and add it again with sudo yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo.
Users wanting the latest version of the CLI without waiting to be backported into the stable release they're using should use the edge release's
community repo through this method below, without mixing packages from stable and unstable repos.1
a414a02
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing gh on Linux and BSD
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
,armhf
.Other sources for installation are community-maintained and thus might lag behind
our release schedule.
Official sources
Debian, Ubuntu Linux, Raspberry Pi OS (apt)
Install:
Upgrade:
Fedora, CentOS, Red Hat Enterprise Linux (dnf)
Install from our package repository for immediate access to latest releases:
sudo dnf install 'dnf-command(config-manager)' sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo sudo dnf install gh
Alternatively, install from the community repository:
Upgrade:
Amazon Linux 2 (yum)
Install using our package repository for immediate access to latest releases:
Upgrade:
openSUSE/SUSE Linux (zypper)
Install:
Upgrade:
Manual installation
Unofficial, community-supported methods
The GitHub CLI team does not maintain the following packages or repositories and thus we are unable to provide support for those installation methods.
Snap (do not use)
There are so many issues with Snap as a runtime mechanism for apps like GitHub CLI that our team suggests never installing gh as a snap.
Arch Linux
Arch Linux users can install from the community repo:
Alternatively, use the unofficial AUR package to build GitHub CLI from source.
Android
Android 7+ users can install via Termux:
FreeBSD
FreeBSD users can install from the ports collection:
Or via pkg(8):
NetBSD/pkgsrc
NetBSD users and those on platforms supported by pkgsrc can install the gh package:
To install from source:
OpenBSD
In -current, or in releases starting from 7.0, OpenBSD users can install from packages:
Funtoo
Funtoo Linux has an autogenerated github-cli package, located in dev-kit, which can be installed in the following way:
Upgrading can be done by syncing the repos and then requesting an upgrade:
Gentoo
Gentoo Linux users can install from the main portage tree:
Upgrading can be done by updating the portage tree and then requesting an upgrade:
Kiss Linux
Kiss Linux users can install from the community repos:
kiss b github-cli && kiss i github-cli
Nix/NixOS
Nix/NixOS users can install from nixpkgs:
openSUSE Tumbleweed
openSUSE Tumbleweed users can install from the official distribution repo:
sudo zypper in gh
Alpine Linux
Alpine Linux users can install from the stable releases' community package repository.
Users wanting the latest version of the CLI without waiting to be backported into the stable release they're using should use the edge release's
community repo through this method below, without mixing packages from stable and unstable repos.1
Void Linux
Void Linux users can install from the official distribution repo:
Footnotes
https://wiki.alpinelinux.org/wiki/Package_management#Repository_pinning ↩