github-auth

Configures GitHub authentication via HTTPS tokens, SSH keys, or gh CLI login.

1|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/maopujie10-sys/Bailongma --skill github-auth-maopujie10-sys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-auth
Source: https://github.com/maopujie10-sys/Bailongma/tree/main/skills/hermes-skills/github/github-auth
Command: npx skills add https://github.com/maopujie10-sys/Bailongma --skill github-auth-maopujie10-sys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up GitHub authentication on a new machine is error-prone: password auth is disabled, tokens need the right scopes, SSH keys must be registered, and headless servers cannot use browser logins. This Skill walks an agent through detecting the current auth state and configuring a working method. ## Core Features & Use Cases - Auth Detection Flow: Checks git, gh CLI availability, existing credentials, and picks the right setup path automatically. - Git-Only Setup: Configures HTTPS personal access tokens with credential helpers or SSH keys with URL rewriting, requiring no sudo or extra installs. - gh CLI Login: Supports interactive browser login on desktops and token-based login on headless servers, plus gh auth setup-git. - API Fallback: Shows how to call the GitHub REST API with curl using a token extracted from the git credential store or a .env file. - Use Case: On a fresh Linux server without root access, use this Skill to create a personal access token, store it with the git credential helper, set the commit identity, and verify push access in minutes. ## Quick Start Set up GitHub authentication on this machine so I can clone, push, and open pull requests without being prompted for a password.

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 without a password?

GitHub disabled password authentication, so use a personal access token as the password with the git credential helper set to store, or configure an SSH key. The token needs the repo scope for read and push access.

How to set up GitHub authentication on a headless server?

Use token-based login: pipe the token into gh auth login --with-token, or configure git directly with the credential.helper store and enter the token when prompted. No browser or sudo access is required.

Should I use SSH keys or HTTPS tokens for GitHub?

HTTPS tokens are more portable and work everywhere without SSH config, while SSH keys suit users who already manage keys. Both are covered; SSH can also run over port 443 if port 22 is blocked.

Can I use the GitHub API without installing gh CLI?

Yes, call the REST API with curl using an Authorization token header. The token can be exported as GITHUB_TOKEN or extracted from the ~/.git-credentials file created by the credential helper.

Why does git push keep asking for a password?

GitHub no longer accepts account passwords for git operations. Generate a personal access token at github.com/settings/tokens with repo scope and use it as the password, or switch the remote to SSH.

Why does authentication fail with 'Permission denied' after setup?

The token likely lacks the repo scope, or stale credentials are cached. Regenerate the token with correct scopes, then run git credential reject to clear old entries and re-authenticate.