From deb92f93a69bbf6d0c41f9d0e0534783bc63ae04 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Thu, 3 Sep 2020 14:48:17 -0500 Subject: [PATCH] update linux installation docs --- README.md | 59 +++++++++++++++-------------------- docs/install_linux.md | 72 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 34 deletions(-) create mode 100644 docs/install_linux.md diff --git a/README.md b/README.md index 01f18ab74..5367402f8 100644 --- a/README.md +++ b/README.md @@ -107,48 +107,40 @@ MSI installers are available for download on the [releases page][]. ### Debian/Ubuntu Linux -Install and upgrade: - -1. Download the `.deb` file from the [releases page][]; -2. Install the downloaded file: `sudo apt install ./gh_*_linux_amd64.deb` - -### Fedora Linux - -Install and upgrade: - -1. Download the `.rpm` file from the [releases page][]; -2. Install the downloaded file: `sudo dnf install gh_*_linux_amd64.rpm` - -### Centos Linux - -Install and upgrade: - -1. Download the `.rpm` file from the [releases page][]; -2. Install the downloaded file: `sudo yum localinstall gh_*_linux_amd64.rpm` - -### openSUSE/SUSE Linux - -Install and upgrade: - -1. Download the `.rpm` file from the [releases page][]; -2. Install the downloaded file: `sudo zypper in gh_*_linux_amd64.rpm` - -### Arch Linux - -Arch Linux users can install from the [community repo][arch linux repo]: +Install: ```bash -pacman -S github-cli +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 +sudo apt-add-repository -u https://cli.github.com/packages +sudo apt install gh ``` -### Android +Upgrade: -Android users can install via Termux: +``` +sudo apt update +sudo apt install gh +``` + +### Fedora, Centos, Red Hat Linux + +Install: ```bash -pkg install gh +sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo +sudo dnf install gh ``` +Upgrade: + +```bash +sudo dnf install gh +``` + +### Other Linux + +See [Linux installation docs](/docs/install_linux.md) + ### Other platforms Download packaged binaries from the [releases page][]. @@ -164,5 +156,4 @@ See here on how to [build GitHub CLI from source][build from source]. [hub]: https://github.com/github/hub [contributing page]: https://github.com/cli/cli/blob/trunk/.github/CONTRIBUTING.md [gh-vs-hub]: /docs/gh-vs-hub.md -[arch linux repo]: https://www.archlinux.org/packages/community/x86_64/github-cli [build from source]: /docs/source.md diff --git a/docs/install_linux.md b/docs/install_linux.md new file mode 100644 index 000000000..062fa1983 --- /dev/null +++ b/docs/install_linux.md @@ -0,0 +1,72 @@ +# Installing gh on Linux + +The core, paid developers of `gh` officially support a `.deb` repository and a `.rpm` repository. We +primarily test against Ubuntu and Fedora but do our best to support other distros that can work with +our repositories. We focus on support for `amd64` and `i386` architectures. + +All other combinations of distro, packaging, or architecture should be considered community +supported. + +## Official methods + +### Debian/Ubuntu Linux (apt) + +Install: + +```bash +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 +sudo apt-add-repository -u https://cli.github.com/packages +sudo apt install gh +``` + +Upgrade: + +``` +sudo apt update +sudo apt install gh +``` + +### Fedora, Centos, Red Hat Linux (dnf) + +Install: + +```bash +sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo +sudo dnf install gh +``` + +Upgrade: + +```bash +sudo dnf install gh +``` + +## Community supported methods + +### openSUSE/SUSE Linux + +It's possible that https://cli.github.com/packages/rpm/gh-cli.repo will work with zypper but it +hasn't been tested. Otherwise, to install from package: + +Install and upgrade: + +1. Download the `.rpm` file from the [releases page][]; +2. Install the downloaded file: `sudo zypper in gh_*_linux_amd64.rpm` + +### Arch Linux + +Arch Linux users can install from the [community repo][arch linux repo]: + +```bash +pacman -S github-cli +``` + +### Android + +Android users can install via Termux: + +```bash +pkg install gh +``` + +[arch linux repo]: https://www.archlinux.org/packages/community/x86_64/github-cli