github-auth

Configure GitHub authentication using git credentials, SSH keys, or the gh CLI.

14|5|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill github-auth-mlt-oss
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-auth
Source: https://github.com/MLT-OSS/hermes-agent-go/tree/main/skills/github/github-auth
Command: npx skills add https://github.com/MLT-OSS/hermes-agent-go --skill github-auth-mlt-oss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Setting up GitHub authentication for an AI agent is error-prone: tokens need the right scopes, git needs credential helpers, SSH keys need generation and registration, and headless servers lack browser login. This Skill provides a detection flow and step-by-step setup so the agent can push code, open PRs, and call the GitHub API without repeated credential prompts. ## Core Features & Use Cases - Automatic auth detection: Runs a decision tree that checks for an authenticated gh CLI, an existing GITHUB_TOKEN, entries in ~/.hermes/.env, or stored git credentials, then picks the right method. - Git-only setup without sudo: Configures HTTPS personal access tokens with credential helpers, or generates ed25519 SSH keys and rewrites HTTPS remotes to SSH. - gh CLI and curl fallback: Supports interactive or token-based gh auth login, plus direct GitHub API access via curl with an extracted token when gh is unavailable. - Use Case: On a fresh headless server, the agent detects no gh CLI, walks the user through creating a token with repo and workflow scopes, stores it via git credential helper, and verifies push access. ## Quick Start Set up GitHub authentication on this machine so you can clone, push, and use the GitHub API.

Frequently Asked Questions about github-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate git with GitHub using a personal access token?▼

Create a token at github.com/settings/tokens with repo and workflow scopes, then run git config --global credential.helper store and perform any git operation like git ls-remote, entering the token as the password. Credentials are saved and reused for future operations.

How do I set up GitHub authentication without the gh CLI or sudo?▼

Use the git-only method: configure an HTTPS personal access token with a credential helper, or generate an ed25519 SSH key with ssh-keygen and add the public key at github.com/settings/keys. Neither approach requires root access or installing additional tools.

gh CLI vs git credential helper for GitHub authentication?▼

The gh CLI handles both API access and git credentials in one step via gh auth login and gh auth setup-git. The git credential helper only covers git operations, so API calls then require curl with a token. Use gh when available; fall back to git plus curl otherwise.

Can I use the GitHub API without installing the gh CLI?▼

Yes. Export your personal access token as GITHUB_TOKEN and call the API with curl using the Authorization: token header. The token can also be extracted from ~/.git-credentials or ~/.hermes/.env if it was previously stored there.

Why does git push keep asking for a password on GitHub?▼

GitHub disabled password authentication, so you must use a personal access token as the password or switch to SSH keys. Also verify a credential helper is configured with git config --global credential.helper so credentials persist between operations.

How do I fix SSH connection refused on port 22 for github.com?▼

Add a Host github.com entry to ~/.ssh/config with Hostname ssh.github.com and Port 443 to route SSH over the HTTPS port. This bypasses networks that block outbound port 22.