Skip to content

Commit

Permalink
Consolidate Linux installation docs
Browse files Browse the repository at this point in the history
- Move all Linux installation docs to the separate page to eliminate repetition
- Indicate that only Ubuntu 20.04 is supported for apt-add-repository method
- Pull openSUSE/SUSE out of the "unofficial" section since it refers to
  downloading our official packages
- Point out manual installation methods as well
  • Loading branch information
mislav committed Sep 7, 2020
1 parent 44a500e commit 016df6a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 48 deletions.
41 changes: 5 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Upgrade:
sudo port selfupdate && sudo port upgrade gh
```

### Linux

See [Linux installation docs](/docs/install_linux.md).

### Windows

`gh` is available via [scoop][], [Chocolatey][], and as downloadable MSI.
Expand Down Expand Up @@ -105,42 +109,6 @@ choco upgrade gh

MSI installers are available for download on the [releases page][].

### Debian/Ubuntu Linux

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

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
```

### Other Linux

See [Linux installation docs](/docs/install_linux.md)

### Other platforms

Download packaged binaries from the [releases page][].
Expand All @@ -149,6 +117,7 @@ Download packaged binaries from the [releases page][].

See here on how to [build GitHub CLI from source][build from source].


[official docs]: https://cli.github.com/manual
[scoop]: https://scoop.sh
[Chocolatey]: https://chocolatey.org
Expand Down
35 changes: 23 additions & 12 deletions docs/install_linux.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# 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.
Packages downloaded from https://cli.github.com or from https://github.com/cli/cli/releases
are considered official binaries. We focus on a couple of popular Linux distros and
the following CPU architectures: `386`, `amd64`, `arm64`.

All other combinations of distro, packaging, or architecture should be considered community
supported.
Other sources for installation are community-maintained and thus might lag behind
our release schedule.

## Official methods
## Official sources

### Debian/Ubuntu Linux (apt)
### Debian, Ubuntu 20.04 Linux (apt)

Install:

Expand All @@ -21,7 +21,7 @@ sudo apt install gh

Upgrade:

```
```bash
sudo apt update
sudo apt install gh
```
Expand All @@ -41,18 +41,27 @@ Upgrade:
sudo dnf install gh
```

## Community supported methods
### openSUSE/SUSE Linux (zypper)

It's possible that https://cli.github.com/packages/rpm/gh-cli.repo will work with zypper, but
this hasn't been tested.

## Manual installation

### openSUSE/SUSE Linux
* [Download release binaries][releases page] that match your platform; or
* [Build from source](./source.md).

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:
### openSUSE/SUSE Linux (zypper)

Install and upgrade:

1. Download the `.rpm` file from the [releases page][];
2. Install the downloaded file: `sudo zypper in gh_*_linux_amd64.rpm`

## Community-supported methods

Our team does do not directly maintain the following packages or repositories.

### Arch Linux

Arch Linux users can install from the [community repo][arch linux repo]:
Expand All @@ -69,4 +78,6 @@ Android users can install via Termux:
pkg install gh
```


[releases page]: https://github.com/cli/cli/releases/latest
[arch linux repo]: https://www.archlinux.org/packages/community/x86_64/github-cli

0 comments on commit 016df6a

Please sign in to comment.