Skip to content

Commit 016df6a

Browse files
committed
Consolidate Linux installation docs
- 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
1 parent 44a500e commit 016df6a

File tree

2 files changed

+28
-48
lines changed

2 files changed

+28
-48
lines changed

README.md

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ Upgrade:
6868
sudo port selfupdate && sudo port upgrade gh
6969
```
7070

71+
### Linux
72+
73+
See [Linux installation docs](/docs/install_linux.md).
74+
7175
### Windows
7276

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

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

108-
### Debian/Ubuntu Linux
109-
110-
Install:
111-
112-
```bash
113-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
114-
sudo apt-add-repository -u https://cli.github.com/packages
115-
sudo apt install gh
116-
```
117-
118-
Upgrade:
119-
120-
```
121-
sudo apt update
122-
sudo apt install gh
123-
```
124-
125-
### Fedora, Centos, Red Hat Linux
126-
127-
Install:
128-
129-
```bash
130-
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
131-
sudo dnf install gh
132-
```
133-
134-
Upgrade:
135-
136-
```bash
137-
sudo dnf install gh
138-
```
139-
140-
### Other Linux
141-
142-
See [Linux installation docs](/docs/install_linux.md)
143-
144112
### Other platforms
145113

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

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

120+
152121
[official docs]: https://cli.github.com/manual
153122
[scoop]: https://scoop.sh
154123
[Chocolatey]: https://chocolatey.org

docs/install_linux.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Installing gh on Linux
22

3-
The core, paid developers of `gh` officially support a `.deb` repository and a `.rpm` repository. We
4-
primarily test against Ubuntu and Fedora but do our best to support other distros that can work with
5-
our repositories. We focus on support for `amd64` and `i386` architectures.
3+
Packages downloaded from https://cli.github.com or from https://github.com/cli/cli/releases
4+
are considered official binaries. We focus on a couple of popular Linux distros and
5+
the following CPU architectures: `386`, `amd64`, `arm64`.
66

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

10-
## Official methods
10+
## Official sources
1111

12-
### Debian/Ubuntu Linux (apt)
12+
### Debian, Ubuntu 20.04 Linux (apt)
1313

1414
Install:
1515

@@ -21,7 +21,7 @@ sudo apt install gh
2121

2222
Upgrade:
2323

24-
```
24+
```bash
2525
sudo apt update
2626
sudo apt install gh
2727
```
@@ -41,18 +41,27 @@ Upgrade:
4141
sudo dnf install gh
4242
```
4343

44-
## Community supported methods
44+
### openSUSE/SUSE Linux (zypper)
45+
46+
It's possible that https://cli.github.com/packages/rpm/gh-cli.repo will work with zypper, but
47+
this hasn't been tested.
48+
49+
## Manual installation
4550

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

48-
It's possible that https://cli.github.com/packages/rpm/gh-cli.repo will work with zypper but it
49-
hasn't been tested. Otherwise, to install from package:
54+
### openSUSE/SUSE Linux (zypper)
5055

5156
Install and upgrade:
5257

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

61+
## Community-supported methods
62+
63+
Our team does do not directly maintain the following packages or repositories.
64+
5665
### Arch Linux
5766

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

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

0 commit comments

Comments
 (0)