Download binary from GitHub CLI repository:
curl -fsSLo "gh_2.73.0_linux_amd64.tar.gz" "https://github.com/cli/cli/releases/download/v2.73.0/gh_2.73.0_linux_amd64.tar.gz"Extract the tar file:
tar -xf gh_2.73.0_linux_amd64.tar.gzCopy binary to your /usr/local/bin:
sudo cp gh_2.73.0_linux_amd64/bin/gh /usr/local/bin/Get gh cli version:
gh versionDelete binary in /usr/local/bin:
sudo rm -rf /usr/local/bin/ghAuthenticate against github.com by reading the token from a file:
gh auth login --with-token < mytoken.txtUse this method when your token is stored in an environment variable (e.g., in CI/CD pipelines or scripts). The token is piped into the gh auth login command via standard input:
echo "$GITHUB_AUTH_TOKEN" | gh auth login --with-tokenRun arkade get and follow the instructions:
arkade get gh