Install the GitHub CLI

Next, you need to install the GitHub Command Line Interface (CLI) on your system. You can follow the official installation guide to install the GitHub CLI your preferred way. Alternatively, you can follow the steps below.

Install the GitHub CLI

The installation steps differ a bit depending on your operating system:

  1. Visit https://cli.github.com/ in your browser and click the Download button
  2. Locate the .msi GitHub CLI installer in your download folder
  3. Double-click the .msi file
  4. Follow the installation wizard instructions

On Debian and Ubuntu, you can install the GitHub CLI using apt:

Shell
$ sudo apt update
$ sudo apt install gh

If gh isn’t found in your default package sources, follow the official Linux installation guide for instructions on adding the GitHub CLI repository first.

On Fedora, CentOS, and Red Hat, use dnf:

Shell
$ sudo dnf install gh

The most convenient way to install the GitHub CLI on macOS is with Homebrew. If you don’t have Homebrew installed yet, open your terminal and run:

Shell
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Follow the prompts to complete the Homebrew installation. Make sure to also follow any instructions that Homebrew prints at the end — you may need to run a command to add Homebrew to your PATH.

Once Homebrew is ready, install the GitHub CLI:

Shell
$ brew install gh

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Already a member? Sign-In

You must own this product to join the conversation.