github-auth

Configure GitHub authentication for git operations and API requests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill prevents Git/GitHub API operations from failing by guiding you to set up reliable GitHub authentication for repository work, PRs, and CI access.

Core Features & Use Cases

  • Git-Only Authentication (HTTPS/SSH): Configure credential helpers for HTTPS personal access tokens or set up SSH keys and rewrite GitHub URLs to use SSH.
  • gh CLI Authentication (if available): Use gh auth login and optionally gh auth setup-git to unify API and git credential handling.
  • Token Fallback for API calls: Support workflows that use curl with a personal access token when gh is not available, including detection from ~/.gengar/.env or ~/.git-credentials.
  • Use Case: When you need to automate PR creation and issue triage on a GitHub repo from a fresh machine, follow this Skill so git pushes and GitHub API calls succeed without repeated logins.

Quick Start

Ask the agent to set up GitHub authentication for your workflow using the method best suited to your environment (gh CLI if installed, otherwise HTTPS token or SSH keys) and verify it works.

Frequently Asked Questions about github-auth

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

FAQPage Schema
How do I configure GitHub authentication for git push without repeated login failures?▼

GitHub authentication is configured by setting up credential helpers for HTTPS personal access tokens or establishing SSH keys. This ensures git push operations and API requests succeed reliably across machines without repeated login failures.

Does GitHub API access work when the gh CLI is not installed?▼

Yes, GitHub API access works without the gh CLI by using a token fallback method. The system supports curl requests with a personal access token, detecting configured GITHUB_TOKEN values from environment files or git credentials to authorize API calls.

What is the best way to automate GitHub PR creation and issue triage from a fresh machine?▼

Automating GitHub PR creation and issue triage requires reliable authentication setup first. Using the gh CLI auth login command unifies API and git credential handling, enabling seamless automation workflows on fresh machines without manual logins.

Can I use SSH keys instead of HTTPS personal access tokens for git operations?▼

Yes, SSH keys can be used instead of HTTPS personal access tokens for git operations. The setup process configures SSH keys and rewrites GitHub URLs to use SSH, providing an alternative to HTTPS credential helpers for repository access.

Why do my git clone and CI-related actions fail on machines without gh installed?▼

Git clone and CI actions fail without proper authentication configured. Without the gh CLI, machines lack unified credential handling, requiring manual HTTPS token or SSH key setup and curl Authorization headers for GitHub API requests.

How do I set up a GitHub personal access token for curl API requests?▼

Setting up a GitHub personal access token for curl API requests involves detecting or configuring a GITHUB_TOKEN value. The token is applied via a curl Authorization header, enabling API access when the gh CLI is unavailable.