github-auth

Configure GitHub authentication for git operations and API access.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/DaddyElonMusk69/motis-agent --skill github-auth-daddyelonmusk69
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-auth
Source: https://github.com/DaddyElonMusk69/motis-agent/tree/main/skills/github/github-auth
Command: npx skills add https://github.com/DaddyElonMusk69/motis-agent --skill github-auth-daddyelonmusk69

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, git, curl, python3, and includes scripts (resource) components.

What problem does it solve?

This skill makes it straightforward for the agent and its user to authenticate with GitHub so repository operations, pull requests, issues, and API calls succeed reliably across machines with different tool availability and permissions.

Core Features & Use Cases

  • Automatic detection of available tools and credentials to pick the best auth path (gh, git credential helpers, or token-based curl).
  • HTTPS personal access token guidance including scopes, storing tokens with git credential helpers, and extracting tokens for API use.
  • SSH key flow with key generation, instructions to add the public key to GitHub, and git URL rewrites for SSH usage.
  • gh CLI integration and headless token login with gh auth and gh auth setup-git for unified API and git credentials.
  • Troubleshooting and fallbacks such as curl-based API access and methods to extract tokens from stored git credentials. Use cases include enabling CI pushes from headless servers, allowing the agent to create and manage PRs, and providing a fallback API access method when gh is unavailable.

Quick Start

Run the GitHub authentication detection flow and follow the recommended gh or git token/SSH setup to enable repository and API access.

Frequently Asked Questions about github-auth

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

FAQPage Schema
How do I authenticate GitHub CLI for headless servers and automated git operations?

To authenticate GitHub CLI for headless servers, you can use a personal access token with gh auth login or configure git credential helpers. This enables automated pull, push, and CI triggers without interactive browser prompts.

What's the best way to configure git credential helper for GitHub personal access tokens?

Configuring git credential helper for GitHub personal access tokens involves storing the token securely so git operations authenticate automatically. The skill detects available tools and guides you through the git credential setup process.

Does this GitHub authentication method work without the gh CLI installed?

Yes, GitHub authentication works without the gh CLI by falling back to HTTPS personal access tokens stored in git credential helpers, SSH key setup, or curl-based API access for repository operations and API calls.

How do I set up SSH keys for GitHub to manage pull requests and issues?

Setting up SSH keys for GitHub involves generating a new key pair, adding the public key to your GitHub account, and rewriting git remote URLs to use SSH. This allows secure repository access for managing pull requests and issues.

Why does my git push fail with authentication errors when using personal access tokens?

Git push authentication errors with personal access tokens often occur due to incorrect token scopes or missing credential helper configuration. The skill troubleshoots these issues and extracts tokens from stored credentials for API use.

Can I use curl to access the GitHub API when gh CLI is unavailable?

Yes, you can use curl to access the GitHub API when gh CLI is unavailable by extracting a personal access token from stored git credentials. This provides a fallback method for API calls, issue tracking, and PR management.