Skip to content
Agentmart
Submit a tool

github-auth

Set up GitHub authentication via gh CLI, SSH keys, and HTTPS personal access tokens

Skill by taracodlabs

IndexedApache-2.0★ 863
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/taracodlabs-github-auth-a90a75

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Set up GitHub authentication via gh CLI, SSH keys, and HTTPS personal access tokens

Use cases: security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/github-auth

What's inside

Skill name
github-auth
Description
Set up GitHub authentication via gh CLI, SSH keys, and HTTPS personal access tokens
License
Apache-2.0
Instructions
126 lines in SKILL.md · view on GitHub

Before installing

  • Instructions read files in your home folder (~/.ssh, ~/.aws…)

Files (2)

  • SKILL.md
  • skill.json

SKILL.md (first lines)

# GitHub Authentication Setup

Configure GitHub authentication for `git` and `gh` CLI operations using the GitHub CLI (`gh`), SSH keys, or HTTPS personal access tokens (PATs).

## When to Use

- User needs to authenticate with GitHub from a new machine
- User is getting `Permission denied (publickey)` or `Authentication failed` errors
- User wants to switch from HTTPS to SSH authentication
- User wants to create or rotate a personal access token
- User wants to verify their current GitHub credentials are working

## How to Use

### 1. Authenticate with gh CLI (recommended)

```powershell
# Interactive login — opens browser for OAuth
gh auth login

# Choose: GitHub.com → HTTPS → Authenticate with browser
# Or choose SSH if preferred

# Verify authentication
gh auth status
```

### 2. Create an SSH key

```powershell
# Generate Ed25519 key (modern, secure)
ssh-keygen -t ed25519 -C "your-email@example.com" -f "$env:USERPROFILE\.ssh\github_ed25519"

# Start ssh-agent and add key
Start-Service ssh-agent
ssh-add "$env:USERPROFILE\.ssh\github_ed25519"

# Display public key to copy to GitHub
Get-Content "$env:USERPROFILE\.ssh\github_ed25519.pub"
```

After running step 2, the user must add the public key at https://github.com/settings/keys → New SSH key.

### 3. Configure SSH to use the key for GitHub

```powershell
# Create or append to SSH config
$config = @"

Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/github_ed25519
"@
Add-Content "$env:USERPROFILE\.ssh\config" $config

# Test SSH connection
ssh -T git@github.com
```

### 4. Create a Personal Access Token (HTTPS)

Direct the user to: https://github.com/settings/tokens/new
- Select scopes: `repo`, `read:org` (for org repos), `workflow` (for Actions)
- Copy the token — it is shown only once

```powershell
# Configure git to cache HTTPS credentials
git config --global credential.helper wincred

# Test — will prompt for username + PAT as password
git clone https://github.com/your-org/your-repo.git
```

### 5. Configure gh CLI with a PAT

```powershell
# Authenticate gh CLI with a PAT non-interactively
$env:GH_TOKEN = "ghp_your_token_here"
gh auth status
```

### 6. Verify and list configured credentials

```powershell
# Check gh auth
gh auth status

# Check git remote URL type
git remote -v

# Test SSH
ssh -T git@github.com
# Expected: "Hi username! You've successfully authenticated..."
```

### 7. Switch a repo from HTTPS to SSH

```powershell
# Show current remote
git remote get-url origin

# Change to SSH
git remote set-url origin git@github.com:owner/repo.git
git remote -v   # verify
```

## Examples

**"I'm on a new machine and need to set up GitHub access"**
→ Use step 1 (`gh auth login`) for the quickest setup. If SSH is preferred, use steps 2–3 then step 1 with SSH option.

**"I'm getting Authentication failed when pushing to GitHub"**
→ Use step 6 to diagnose. If HTTPS, rotate the PAT (step 4). If SSH, run `ssh -T git@github.com` to test.

**"Generate a new SSH key and add it to GitHub"**
→ Use steps 2–3 and instruct user to paste the public key at github.com/settings/keys.

## Cautions

From taracodlabs/aiden, Apache-2.0.

More from taracodlabs/aiden

Signals

Stars
863
Forks
150
Open issues
12
Last commit (this folder)
May 3, 2026 (5 months ago)
Last release
Oct 19, 2026 (9 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from taracodlabs

Cite this page

github-auth skill. Agent Mart. https://agentmart.dev/skills/taracodlabs-github-auth-a90a75 (last updated 2026-10-24)