github-auth

Configure GitHub authentication for git or gh CLI access.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/afel6/scal-ai-pipeline --skill github-auth-afel6
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-auth
Source: https://github.com/afel6/scal-ai-pipeline/tree/main/hermes_skills_library/github/github-auth
Command: npx skills add https://github.com/afel6/scal-ai-pipeline --skill github-auth-afel6

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill removes friction when granting an agent access to GitHub by automating detection and configuration of authentication methods so the agent can clone, push, create PRs, and call the GitHub API without manual troubleshooting.

Core Features & Use Cases

  • Automatic detection of available tools and authentication state (git, gh, environment variables, and git credential stores).
  • Multiple authentication flows with clear fallback: gh CLI interactive or token-based login, HTTPS personal access token saved via git credential helpers, and SSH key generation/registration.
  • Verification and troubleshooting steps to validate auth, resolve common permission errors, and extract tokens when needed for API fallbacks.
  • Use Case: Prepare a headless CI machine so an autonomous agent can push branches, open PRs, and call API endpoints even when gh is not installed.

Quick Start

Configure GitHub authentication for the current machine using the gh CLI if available otherwise fall back to git with a personal access token or SSH key.

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 an automated agent on a headless server?

To configure GitHub authentication on a headless server, the Skill detects installed tools and selects an HTTPS token or SSH workflow, enabling the agent to clone, push, and call the API without manual troubleshooting.

What's the best way to authenticate with GitHub using a personal access token via git?

Authenticating with a GitHub personal access token via git is handled by saving the token using git credential helpers, providing HTTPS access for repository operations when the gh CLI is not installed.

Does this GitHub authentication setup work in CI environments without the gh CLI installed?

Yes, this setup works in CI environments without the gh CLI by falling back to git with a personal access token or SSH key, ensuring autonomous agents can push branches and open PRs.

Can I extract an existing GitHub token from the git credential store for API calls?

Yes, you can extract existing tokens from git credential stores when present, allowing the agent to perform GitHub API calls as a fallback without requiring a new interactive login process.

How does SSH key generation and registration work for GitHub access?

SSH key generation and registration provides an alternative authentication workflow, allowing git to access GitHub repositories securely when HTTPS token methods are unavailable or unsuitable for the environment.

Why does my GitHub authentication fail when an agent tries to push branches or open PRs?

GitHub authentication may fail due to missing credentials or tool misconfiguration, but this Skill verifies access and runs troubleshooting steps to resolve common permission errors during git or gh operations.