github-auth

Configure GitHub authentication using HTTPS tokens, SSH keys, or the gh CLI.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/jamsdoescode/Erik-s-Portfolio --skill github-auth-jamsdoescode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-auth
Source: https://github.com/jamsdoescode/Erik-s-Portfolio/tree/main/openclicky/AppResources/OpenClicky/OpenClickyBundledSkills/github-auth
Command: npx skills add https://github.com/jamsdoescode/Erik-s-Portfolio --skill github-auth-jamsdoescode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up GitHub authentication is a common blocker before any repository work can begin, and the right method depends on which tools are installed and whether you have sudo access. This Skill detects the available tooling and walks through the correct authentication path so git operations, API calls, and gh CLI commands work without repeated credential prompts. ## Core Features & Use Cases - Automatic Detection: Checks for git, gh CLI, existing credentials, and auth status, then follows a decision tree to pick the right setup method. - Git-Only Authentication: Configures HTTPS personal access tokens with credential helpers or SSH keys with URL rewriting, requiring no sudo or extra installs. - gh CLI Authentication: Supports interactive browser login and token-based headless login, plus gh auth setup-git for unified credentials. - API Fallback via curl: Extracts tokens from the git credential store or environment variables to call the GitHub REST API when gh is unavailable. - Use Case: On a fresh headless server without sudo, use this Skill to create a personal access token, configure the git credential store, set commit identity, and verify push access in minutes. ## 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?

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. Enter your username and paste the token as the password; it is saved for future operations.

How do I set up SSH keys for GitHub authentication?

Generate a key with ssh-keygen -t ed25519, add the public key at github.com/settings/keys, then test with ssh -T [email protected]. Optionally configure git config --global url."[email protected]:".insteadOf to rewrite HTTPS URLs to SSH automatically.

Should I use gh CLI or git credential helper for GitHub auth?

Use gh CLI if it is installed, since gh auth login handles both API access and git credentials in one step. If gh is not installed and you lack sudo, the git credential helper with a personal access token works with no additional installation.

Can I use the GitHub API without the gh CLI?

Yes, call the REST API with curl using an Authorization header containing your personal access token. The token can be exported as GITHUB_TOKEN or extracted from the ~/.git-credentials file if the store credential helper is configured.

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

GitHub disabled password authentication for git operations, 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.

What do I do when SSH to github.com on port 22 is refused?

Some networks block port 22, so configure SSH over the HTTPS port instead. Add a Host github.com entry to ~/.ssh/config with Hostname ssh.github.com and Port 443, then retry ssh -T [email protected].