git-credentials
Skill2 starsChanged 57 days agoMITView on GitHub
Diagnose git clone, fetch, and push authentication failures from Termux without exposing tokens or private keys (HTTPS tokens, SSH keys, host key prompts, wrong account, missing scopes). Use for Authentication failed, HTTP 403, Permission denied (publickey), repeated credential prompts, or key permission warnings. Do NOT use for network outages, wrong remote names, or non-authentication rejections such as non-fast-forward.
- Reads credentials
- Commits and pushes
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- background-processesSkill
- github-actionsSkill
- node-native-buildSkill
- package-troubleshootingSkill
- proot-boundariesSkill
- python-native-buildSkill
- storage-permissionsSkill
- termux-adbSkill
- termux-apiSkill
- termux-backupSkill
- termux-environmentSkill
- termux-networkSkill
- termux-servicesSkill
- termux-sshdSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Run sh scripts/check-git-auth.sh.
- Distinctive: line 33
Use one method per remote.
- Distinctive: line 44
Run the read-only git ls-remote origin and confirm refs list without a prompt.
- Distinctive: line 47
Keep the old remote URL and config lines in the report.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Credentials
Purpose
Diagnose git clone, fetch, and push authentication failures in Termux without ever exposing a token or private key.
When to use
Authentication failed, HTTP 403, Permission denied (publickey), Host key verification failed, repeated credential prompts, UNPROTECTED PRIVATE KEY FILE, or Permission to X denied to Y.
When NOT to use
Network outages (termux-network), wrong remote names, or non-authentication push rejections such as non-fast-forward or protected-branch rules that name no credential problem.
Preconditions
Run sh scripts/check-git-auth.sh. It redacts credentials embedded in remote URLs, lists key file names and modes only, and never reads key contents. If a remote URL embeds a token (https://user:secret@host/...), do not repeat it; that is itself a finding to fix.
Decision tree
- HTTPS remote: GitHub does not accept account passwords for git. Use a personal access token with minimal scope or
gh auth loginandgh auth setup-git.gh auth statusdoes not print the token. - HTTP 403 with a valid token: the token lacks
repo(or the fine-grained repository selection), the organization requires SSO authorization of the token, or the branch is protected. Permission to X denied to Y: the authenticated accountYis not the one with access. Check which identity the credential helper supplies.credential.helper storekeeps tokens in plaintext in~/.git-credentials. Report it as a finding and preferghas the helper.- SSH remote:
Permission denied (publickey). List key file names in~/.ssh(never contents), confirm the matching.pubis registered with the account, and testssh -T git@github.com. A successful GitHub test prints a greeting and exits with status 1; that is normal. UNPROTECTED PRIVATE KEY FILE:~/.sshshould be mode 700 and private keys 600. Keys on shared storage cannot hold these modes; keep them under$HOME(seestorage-permissions).Host key verification failed: compare the fingerprint with the host's published one before accepting. Never setStrictHostKeyChecking=noas a fix.- Works only sometimes: Termux does not start an
ssh-agent. Name the key withIdentityFilein~/.ssh/config, or start an agent per session. - Use one method per remote. Do not mix an embedded token and SSH on one repository.
Example
- Situation: git push returns HTTP 403 although a token is configured.
- Without the skill: Embeds the token in the remote URL and enables
credential.helper store. - With the skill: Runs the redacting helper, checks token scope and SSO authorization, switches to
gh auth loginwithgh auth setup-git, and reports any plaintext credential file as a finding.
Safety
Generating keys, editing ~/.ssh/config, storing credentials, and changing remotes mutate state and need confirmation. Never paste tokens or private keys into chat, logs, commits, or URLs. Only a .pub file is safe to display.
Verification
Run the read-only git ls-remote origin and confirm refs list without a prompt. Push only when the user asks.
Rollback
Keep the old remote URL and config lines in the report. Revoke any token or key that was exposed during the session at the provider.
Handoffs
storage-permissionswhen keys sit on shared storage.termux-networkwhen the host is unreachable.github-actionswhen the real task is a CI failure.termux-sshdfor inbound login, which is a different problem from git auth.
Report
Remote scheme and host, the failing layer (token, scope, account, key, permissions, host key), the one change proposed, and the git ls-remote result.
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.

