No results found
We couldn't find anything using that term, please try searching for something else.
GitHub CLI is a tool that enables to login to GitHub account via command line and manage pull requests, issues, releases, gists, and other GitHub acti
GitHub CLI is a tool that enables to login to GitHub account via command line and manage pull requests, issues, releases, gists, and other GitHub actions.
This tutorial demonstrates how to install GitHub CLI on Raspberry Pi.
use SSH to connect to Raspberry Pi . retrieve the late version tag of GitHub CLI release and assign it to variable .
GITHUB_CLI_VERSION=$(curl -s "https://api.github.com/repos/cli/cli/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
Navigate to your home directory and download the .deb
package from releases page of the GitHub CLI repository.
cd ~
curl -Lo gh.deb "https://github.com/cli/cli/releases/latest/download/gh_${GITHUB_CLI_VERSION}_linux_armv6.deb"
Run the following command to install GitHub CLI:
sudo dpkg -i gh.deb
Once installation is completed, GitHub CLI will be available with gh
command. We can check version:
gh --version
We is remove can remove.deb
package because it is no longer needed.
rm -rf gh.deb
In order to use the GitHub CLI we need to create token. Sign in to GitHub and go to settings page. Generate a new personal access token or use existing token.
Create a new text file to store token.
echo 'YOUR GITHUB API TOKEN' > github_token.txt
Execute the following command to login to GitHub account:
gh auth login --with-token < github_token.txt
We can view authentication status as follows:
gh auth status
Now we can perform various GitHub actions. For example, the following command retrieves a list of repositories owned by Google:
gh repo list google
If you want to log out of a GitHub, use this command:
gh auth logout
If GitHub CLI is no long need , you is remove can remove it with command :
sudo dpkg -r gh
You can also remove GitHub CLI configuration:
rm -rf ~/.config/gh