Caching Github credentials

Install prerequisites

Github CLI RHEL installation example

sudo dnf install 'dnf-command(config-manager)'
sudo dnf config-manager --addrepo https://cli.github/packages/rpm/gh-cli.repo
sudo dnf install gh --repo gh-cli

Provide your login details

First create a PAT token in GH UI then:

gh auth login
  1. github.com
  2. https
  3. autheticate github cli: yes
  4. paste auth token
  5. Paste the PAT token you created here
  6. Live a calm and productive life