Github Cli on Red Hat Enterprise Linux (RHEL) Installation Guide

First step is to add Github CLI Repo by using config manager. See the steps below for different OS


Terminal window
sudo dnf config-manager --add-repo
sudo dnf install gh


Terminal window
sudo yum-config-manager --add-repo
sudo yum install
sudo yum install gh

For other operating systems, please checkout Official Github Page Github

Login to start using Github CLI

Terminal window
gh auth login --with-token "token here"
# env variable for token
export GH_TOKEN="token here"

To Authenticate with Github Enterprise Server

Terminal window
gh auth login -h "domain here" --with-token "token here"

If you prefer to use environment variables

Terminal window
export GH_HOST="hostname here"
export GH_ENTERPRISE_TOKEN="token here"

To check authentication status

Terminal window
gh auth status
# if you have multiple projects
gh auth status -h "hostname"
Subscribe now!
No spam, we promise!