check:github

Verify GitHub credentials from the .env file.


Usage

splent check:github

Description

Reads GITHUB_USER and GITHUB_TOKEN from the environment and:

  1. Checks both variables are present and non-empty.
  2. Calls GET /user on the GitHub API to verify the token is valid.
  3. Confirms the authenticated user matches GITHUB_USER.
  4. Displays account name, plan, and remaining API rate limit.

The token is masked in the output (ghp_****...****).

Example output

🐙 GitHub Credentials Check

[✔] GITHUB_USER = splent-dev
[✔] GITHUB_TOKEN = ghp_****...****0b

Contacting GitHub API...
[✔] Authenticated as splent-dev
[✔] Name: Alex Rivera
[✔] Plan: free
[✔] Rate limit: 4998/5000 remaining

✅ GitHub credentials OK.

Requirements

Variable Description
GITHUB_USER Your GitHub username.
GITHUB_TOKEN A personal access token (classic) with repo scope.

Generate a token at: github.com/settings/tokens


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es