github-auth

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

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill github-auth-chensihakniroth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github-auth
Source: https://github.com/Chensihakniroth/ANAKOT-AGENT/tree/main/skills/github/github-auth
Command: npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill github-auth-chensihakniroth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

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 need configuration, and headless servers lack browser login. This Skill detects the available tools and walks through the correct authentication path so git operations and GitHub API calls work without repeated credential prompts. ## Core Features & Use Cases - Automatic Auth Detection: Checks for gh CLI, existing tokens, git credential helpers, and environment variables to determine the current authentication state before doing anything. - Multiple Auth Methods: Supports HTTPS personal access tokens with credential caching, SSH key generation and configuration, and gh CLI login for both desktop and headless environments. - API Access Without gh: Extracts stored tokens from git credentials or environment files to authenticate curl-based GitHub API requests when the gh CLI is unavailable. - Use Case: You SSH into a fresh Linux server with no sudo access and need to clone and push to a private repository. The Skill detects that gh is not installed, guides token creation, configures the git credential store, and verifies push access. ## Quick Start Set up GitHub authentication on this machine so I 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?▼

Generate 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. Enter your username and paste the token as the password; git saves it for future use.

How to set up SSH key authentication for GitHub?▼

Generate an ed25519 key with ssh-keygen, add the public key at github.com/settings/keys, then test with ssh -T [email protected]. Optionally configure git to rewrite HTTPS URLs to SSH using the url.insteadOf setting.

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

Yes, use curl with an Authorization header containing your personal access token. The token can be exported as GITHUB_TOKEN or extracted from the git credential store at ~/.git-credentials if HTTPS auth is already configured.

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

GitHub disabled password authentication for git operations. Use a personal access token in place of the password, or switch the remote to SSH. Also verify a credential helper like store or cache is configured so credentials persist.

Does GitHub authentication work on headless servers without a browser?▼

Yes, use token-based login by piping the token to gh auth login --with-token, or skip gh entirely and configure git with a personal access token and credential helper. Neither method requires a browser or sudo access.