github-auth
Skill22 starsChanged 8 days agoMITView on GitHub
Operator setup for GitHub auth — HTTPS tokens (PAT, fine-grained, classic), SSH keys (ed25519), and `gh` CLI login. Diagnoses the common failure modes ("Permission denied", "Bad credentials", "Token expired") and walks the user to a working `git push` + `gh auth status`.
- Reads credentials
- Installs packages
- Commits and pushes
19 other projects use a version of this.
Adopted by
Most recently taken up by
- delorenj/skillstheir own version, first seen Nov 7, 2026
- rakaarwaky/agents-arwakytheir own version, first seen Nov 1, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- gquthier/CLAWGtheir own version, first seen Oct 17, 2026
- Fahrnetic/engineering-agent-skill-workflowtheir own version, first seen Oct 15, 2026
- Stuko0/alice-agenttheir own version, first seen Oct 13, 2026
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- math-inc/OpenGauss★ 1.3ksame name
- Tommy-yw/RunbookHermes★ 546same name
- aivrar/portable-hermes-agent★ 239same name
- RedWoodOG/Hermes-Desktop★ 177same name
- AtlasOmnia/donna-starter★ 136same name
- AtlasOmnia/hermes-custom-pack★ 75same name
- delorenj/skills★ 17same name
- gquthier/CLAWG★ 16same name
- Samin12/skills★ 8same name
- Martin-Hausleitner/martins-awesome-skills★ 3same name
9 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- dependency-analyzerSkill
- docsSkill
- handoffSkill
- openai-reviewerSkill
- plugin-homeSkill
- schema-validatorSkill
- security-auditSkill
- session-auditSkill
- test-validatorSkill
- claude-codeSkill
- codexSkill
- opencodeSkill
- chartsSkill
- export-csvSkill
- export-excelSkill
- make-chartSkill
- make-html-reportSkill
- make-pdfSkill
- a2a-communicateSkill
- a2a-handle-inboundSkill
- codebase-inspectionSkill
- ethos-skill-authoringSkill
- native-mcpSkill
- github-code-reviewSkill
- github-issuesSkill
- github-pr-workflowSkill
- github-repo-managementSkill
- birth-ritualSkill
- get-to-know-youSkill
- xurlSkill
- arxivSkill
- grounded-citationsSkill
- research-paper-writingSkill
- reddit-researchSkill
- code-reviewSkill
- coding-agentSkill
- planSkill
- requesting-code-reviewSkill
- spikeSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- tddSkill
- writing-plansSkill
- no-ai-slopSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 19 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Run these and read the output before doing anything:
- Very specific: line 77
Use when gh isn't available or when scoping matters (per-repo, expiry, narrow permissions).
- Distinctive: line 131
If git ls-remote prompts for credentials, the helper isn't wired.
- Very specific: line 145
Never write tokens to shell history: Use a credential helper, OS keychain, or a secret manager (pass, 1password-cli, op).
- Very specific: line 154
Verify with gh auth status (Path A) or ssh -T git@github.com (Path C) or git ls-remote (any).
“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Auth
Get the operator's machine talking to GitHub. Three credential paths exist — pick the right one and stop.
When to use this skill
gh auth statusreports "not logged in" or "expired token".git pushreturns "Permission denied (publickey)" or "fatal: Authentication failed".- User says "set up GitHub" / "configure git" on a fresh machine or fresh repo.
When NOT to use this skill
- The error is repo-level (branch protection, missing collaborator access) — that's a permissions problem on github.com, not a credential problem here.
- The user is using GitHub Enterprise Server — the flows differ; ask before running
gh auth login.
Step 1 — diagnose
Run these and read the output before doing anything:
gh auth status
git config --get remote.origin.url # capture: https://... or git@github.com:...
ssh -T git@github.com 2>&1 | head -5 # for SSH pathsThe current remote.origin.url tells you which path to fix. Don't switch the user from HTTPS to SSH (or vice versa) without asking — they may have habits or scripts that depend on the choice.
Step 2 — pick the credential path
Path A — gh CLI (recommended for most operators)
Best when the user does most GitHub work through gh pr, gh issue, gh repo. Token is stored in the OS keychain; git operations against https://github.com/... remotes pick it up automatically via the gh credential helper.
gh auth login
# Pick: GitHub.com → HTTPS → "Login with a web browser"
# Paste the one-time code from the terminal into the opened browser.After login:
gh auth setup-git # registers gh as the git credential helper
gh auth status # should print "Logged in to github.com as <user>"Path B — Fine-grained Personal Access Token (best for CI / scripts)
Use when gh isn't available or when scoping matters (per-repo, expiry, narrow permissions).
- Visit github.com → Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new.
- Scope to specific repositories. Set an expiry (90 days is a reasonable default).
- Pick the permissions the user actually needs (Contents: Read+Write, Pull requests: Read+Write for typical PR work).
- Store the token in a credential helper, not in shell history:
# macOS — uses Keychain via osxkeychain helper (shipped with git)
git config --global credential.helper osxkeychain
# Linux — libsecret helper (per-distro install)
sudo apt-get install libsecret-1-0 libsecret-1-dev
sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecretThe next git push prompts for username (the GitHub login) and password (paste the token). The helper caches it.
Path C — SSH key (best for power users with multiple machines)
The user runs these four commands in their own terminal. Do not run them through the agent's terminal: it refuses any command touching ~/.ssh (the always-deny floor) and eval.
ssh-keygen -t ed25519 -C "<email@example.com>" -f ~/.ssh/id_ed25519_github
eval "$(ssh-agent -s)"
ssh-add --apple-use-keychain ~/.ssh/id_ed25519_github # macOS; drop --apple-use-keychain on Linux
cat ~/.ssh/id_ed25519_github.pub # copy to clipboardPaste the public key into github.com → Settings → SSH and GPG keys → New SSH key. Verify:
ssh -T git@github.com
# Expected: "Hi <user>! You've successfully authenticated..."Switch the remote to SSH if not already:
git remote set-url origin git@github.com:<owner>/<repo>.gitStep 3 — verify end-to-end
Regardless of which path you took, run this sequence and confirm each step:
gh auth status # path A only
ssh -T git@github.com # path C only
git ls-remote # both paths — must succeed without prompting
git fetch # both paths — silent successIf git ls-remote prompts for credentials, the helper isn't wired. Re-check Step 2 for your chosen path.
Common failures and their cause
| Symptom | Cause | Fix |
Permission denied (publickey) | SSH key not loaded in the agent, or not added on github.com | ssh-add -l to list loaded keys; re-add if missing |
remote: Invalid username or password | Stale token cached by credential helper | Clear the entry: git credential-osxkeychain erase (macOS) and retry — it will reprompt |
gh auth status shows "expired" | PAT or device-flow token rotated past its TTL | Re-run gh auth login |
git push works but gh pr create fails | gh auth setup-git not run after gh auth login | Run it |
| 2FA bypass prompt every push | HTTPS without a credential helper | Pick A or B above; never paste tokens at every push |
Hard rules
- Never write tokens to shell history. Use a credential helper, OS keychain, or a secret manager (
pass,1password-cli,op). - Never check tokens into git. Even in
.env.example. If a token leaks, rotate it immediately and grep history. - Prefer fine-grained tokens over classic PATs. Classic PATs grant everything-on-everything; fine-grained scope per repo + per permission.
- Set an expiry. A token without an expiry is a leak waiting to happen.
Setup the user needs to do once
- Install
gh:brew install gh(macOS) or per cli.github.com for other OSes. - Authenticate via one of the three paths above.
- Verify with
gh auth status(Path A) orssh -T git@github.com(Path C) orgit ls-remote(any).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

