Windows github auth diagnosis
Agent skill for Codex and Claude Code that diagnoses Windows GitHub auth false negatives (HTTP 401, Bad credentials, SEC_E_NO_CREDENTIALS) caused by sandboxes that cannot read the Windows keyring.
npx -y skills add h8nc4y/windows-github-auth-diagnosisAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Diagnose Windows Codex or agent sandbox GitHub authentication false negatives. Use when sandboxed `gh auth status`, `gh api`, `git fetch`, `git push`, or `git ls-remote` reports HTTP 401, Bad credentials, an invalid default token, `SEC_E_NO_CREDENTIALS`, missing credentials, or when an agent might ask for `gh auth login`, OAuth, or token input based only on a sandbox GitHub auth error.
SKILL.md
5.6 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
Windows GitHub Auth Diagnosis
Use this skill before declaring GitHub authentication broken on Windows when the failing command ran inside a Codex, agent, or tool sandbox.
Core Rule
Treat sandbox-only GitHub authentication failures as false-negative candidates until a keyring-capable path proves otherwise. Some Windows agent sandboxes cannot read Credential Manager or another configured keyring even when GitHub CLI and Git are correctly authenticated in a normal terminal.
Do not run or suggest gh auth login, gh auth logout, or gh auth refresh based only on a sandbox HTTP 401, Bad credentials, invalid default token, or SEC_E_NO_CREDENTIALS result.
Known False-Negative Symptoms
gh auth status -h github.com --json hostsreturns HTTP 401, Bad credentials, or an invalid default token from a sandboxed command.gh api user --jq .loginreturnsRequires authentication (HTTP 401)from a sandboxed command.git ls-remote,git fetch,git pull, orgit pushover HTTPS fails withschannel: AcquireCredentialsHandle failed: SEC_E_NO_CREDENTIALSfrom a sandboxed command.
Procedure
-
Confirm repository remote wiring:
git -C <repo> remote -vIf
originis missing, classify the problem asNO_ORIGINor remote misconfiguration, not as GitHub authentication failure. -
Check credential helper configuration:
git -C <repo> config --get-all credential.helper git -C <repo> config --get-all credential.https://github.com.helper -
Run the proof commands from a keyring-capable execution path without printing token values. In Codex, if sandboxed commands fail with the symptoms above, use the smallest available unsandboxed or approval-backed command path for only these proof commands:
gh auth status -h github.com --json hosts gh api user --jq .login GIT_TERMINAL_PROMPT=0 git -C <repo> ls-remote origin HEADIf a proof command fails in a way that can be transient, such as a network timeout, a DNS or proxy hiccup, or temporary GitHub unavailability, retry the same command once before classifying the result. Classify only reproducible failures.
-
Treat GitHub authentication as healthy only when all of these are true:
gh auth statusreportsstate=success.gh auth statusreportstokenSource=keyring, the documented keyring-backed source for the environment, or an environment-variable token source such asGH_TOKENorGITHUB_TOKEN. An environment-variable token does not depend on keyring visibility, so when the remaining proof checks pass it is a valid healthy state, not a false-negative candidate.gh api user --jq .loginreturns the expected login.GIT_TERMINAL_PROMPT=0 git -C <repo> ls-remote origin HEADreturns a ref, unless the remote is intentionally empty and stderr plus exit status show authentication succeeded.
-
If keyring proof succeeds, classify the sandbox 401, Bad credentials, invalid default token, or
SEC_E_NO_CREDENTIALSresult as a sandbox false negative. Continue push, PR, review, merge, or other GitHub work through the same keyring-capable execution path.
Exceptions To Preserve
NO_ORIGIN: missing or wrongoriginis a remote configuration problem.- Empty repository:
ls-remote origin HEADcan return no ref for a truly empty remote; inspect stderr and exit status before calling it auth failure. - Branch protection: push rejection from protected branches is not authentication failure.
- Permission or scope shortage: successful login with a failed operation can still indicate missing repository permission or token scope.
- Network outage: DNS, TLS, proxy, or GitHub availability problems are separate from credential health.
- Agent approval layer rejection: if a tool approval layer blocks
git pushor a GitHub command, classify it as an approval or permission-layer blocker, not GitHub auth failure.
Prohibited Responses
- Do not print token values or run commands such as
gh auth tokenorgh auth status --show-token. - Do not ask for OAuth, token, secret, or credential entry based only on sandboxed failures.
- Do not run or suggest
gh auth login,gh auth logout, orgh auth refreshuntil the keyring-capable proof path also fails and no exception explains the result. - Do not wait in OAuth or token-entry loops.
- Do not paste real secrets, real authentication logs, cookies, screenshots, or customer data into public issues or chat reports.
Reporting Template
When reporting the diagnosis, include only safe facts:
- sandbox symptom and command class, without tokens or secret-bearing logs
- remote wiring result
- credential helper result, with no secret values
- keyring-capable proof result: success or failure
- final classification: false negative, remote misconfiguration, permission/scope issue, branch protection, network issue, approval-layer blocker, or unresolved
- next command to continue, if safe
Note: the repository's private-marker scanner (
scripts/scan-private-markers.ps1) is a best-effort guard against leaking secrets into public artifacts. It does not recognize every secret format, so always sanitize reports and issues by hand rather than relying on the scan alone.
Gives 0 of the 12 instructions most auth identity skills give in ~1.1k tokens
Counted across 409 of the 410 authors here whose files we hold, read 2026-08-06
- hash passwords with bcrypt or argon2in 53 of 409, across 43 files
- use parameterized queriesin 47 of 409, across 39 files
- load SECRET_KEY from environment variablesin 23 of 409, across 14 files
- validate all input server-sidein 19 of 409, across 11 files
- refresh access tokens before expiryin 17 of 409, across 9 files
- store tokens in httponly cookiesin 17 of 409, across 16 files
- store refresh tokens securelyin 16 of 409, across 6 files
- validate webhook signatures before processingin 15 of 409, across 5 files
- sanitize user inputsin 15 of 409, across 9 files
- implement rate limiting on auth endpointsin 14 of 409, across 9 files
- encrypt sensitive data at restin 13 of 409, across 10 files
- validate uploaded file extensions and sizesin 12 of 409, across 5 files
Said here and by no other author read
- treat sandbox github auth failures as potential false negatives
- confirm repository remote wiring before diagnosing auth
- check credential helper configuration
- run proof commands from a keyring capable path
- retry transient failures once before classifying
- classify reproducible failures
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.