claudegoodies
Skill

github-auth

From NousResearch

GitHub auth setup: HTTPS tokens, SSH keys, gh CLI login.

Sets up GitHub authentication via HTTPS tokens, SSH keys, or gh CLI login for git and API access.

Use it when

  • Configuring a new machine or agent to push/pull GitHub repos
  • No sudo access and gh CLI isn't installed
  • Need to trigger GitHub Actions or hit the API without gh
  • Setting up headless/SSH server auth for GitHub

Skip it if

  • Already authenticated via gh auth status or working credential helper
  • Just a walkthrough of standard git/gh/ssh-keygen commands, no custom tooling
  • Storing tokens via credential.helper store saves them in plaintext

Facts

Status
Actively maintained
Last commit

Source preview

The instructions Claude Code reads when this skill runs.

# GitHub Authentication Setup

This skill sets up authentication so the agent can work with GitHub repositories, PRs, issues, and CI. It covers two paths:

- **`git` (always available)** — uses HTTPS personal access tokens or SSH keys
- **`gh` CLI (if installed)** — richer GitHub API access with a simpler auth flow

## Detection Flow

When a user asks you to work with GitHub, run this check first:

```bash
# Check what's available
git --version
gh --version 2>/dev/null || echo "gh not installed"

# Check if already authenticated
gh auth status 2>/dev/null || echo "gh not authenticated"
git config --global credential.helper 2>/dev/null || echo "no git credential helper"
```

**Decision tree:**
1. If `gh auth status` shows authenticated → you're good, use `gh` for everything
2. If `gh` is installed but not authenticated → use "gh auth" method below
3. If `gh` is not installed → use "git-only" method below (no sudo needed)

---

## Method 1: Git-Only Authentication (No gh, No sudo)

This works on any machine with `git` installed. No root access needed.

### Option A: HTTPS with Personal Access Token (Recommended)

This is the most portable method — works everywhere, no SSH config needed.

**Step 1: Create a personal access token**

Tell the user to go to: **https://github.com/settings/tokens**

- Click "Generate new token (classic)"
- Give it a name like "hermes-agent"
- Select sc
View full source on GitHub →

Other skills