github-auth

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

Updated May 29, 2026
One-click install
npx skills add https://github.com/m4an5you6/aspera-agent --skill github-auth-m4an5you6
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-auth
Source: https://github.com/m4an5you6/aspera-agent/tree/main/skills/github/github-auth
Command: npx skills add https://github.com/m4an5you6/aspera-agent --skill github-auth-m4an5you6

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Setting up GitHub authentication on a new machine or headless server is error-prone: password auth is disabled, tokens need correct scopes, and SSH keys require manual configuration. This Skill walks through detecting the current auth state and configuring credentials so git operations, PRs, issues, and CI workflows work without repeated prompts. ## Core Features & Use Cases - Auth Detection Flow: Checks for git, gh CLI, existing credentials, and credential helpers, then follows a decision tree to pick the right setup method. - Git-Only Setup (No sudo): Configures HTTPS personal access tokens with credential helpers, or SSH ed25519 keys with URL rewriting — works on any machine with git installed. - gh CLI Login: Supports interactive browser login on desktops and token-based login for headless servers, plus gh auth setup-git integration. - API Access Without gh: Provides curl-based GitHub API patterns and a helper script (gh-env.sh) that detects the auth method, resolves the username, and exports repo context variables. - Use Case: You SSH into a fresh cloud VM with no root access and need to clone and push to a private repo. The Skill detects gh is missing, guides token creation with repo and workflow scopes, configures the credential store, and verifies push access. ## Quick Start Set up GitHub authentication on this machine so I can clone, push, and open pull requests without being prompted for credentials.

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 credential helper set to store, or switch to SSH key authentication. Generate a token at github.com/settings/tokens with the repo and workflow scopes.

How to set up GitHub authentication on a headless server without sudo?▼

Use the git-only method: create a personal access token, run git config --global credential.helper store, then perform any git operation and enter the token when prompted. No root access or gh CLI installation is needed.

Should I use gh CLI or git credentials for GitHub authentication?▼

If gh is installed, gh auth login handles both API access and git credentials in one step via gh auth setup-git. If gh is unavailable, git credential helpers with a token plus curl for API calls cover the same workflows.

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

GitHub removed password authentication for git operations. You must use a personal access token in place of the password, or configure SSH keys and rewrite HTTPS remotes to [email protected] URLs.

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

Yes, call the REST API with curl using an Authorization: token header and a personal access token stored in GITHUB_TOKEN. The token can also be extracted from ~/.git-credentials if the store credential helper is configured.

Why does SSH to github.com fail with connection refused on port 22?▼

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