Document the GCM credential failure, and add a README #94
No reviewers
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder!94
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude-md-git-credential-note"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Documents the git push credential failure hit during #80, so the next person to see it — the laptop, or either of us in three months — does not re-derive it.
Why this is worth writing down
The symptom is maximally misleading.
fj issue createsucceeded moments before the push failed, so it looked like a forgejo problem and was not. And the push dies onCredentials are incorrect or have expiredwith no prompt to answer, which reads like a server fault rather than a client one.The actual cause
Git Credential Manager's generic provider sniffs the
WWW-Authenticate: Basic realm="Gitea"header, recognises forgejo, and applies a built-in OAuth client. Per GCM's own docs that detection is automatic and not configurable — no git config key, no environment variable. So thecredential.https://git.liamjd.net.provider=genericline in~/.gitconfignever meant "use basic auth", which is exactly what sent the diagnosis down the wrong path twice.The silent failure itself is GCM issue #1408 — on expiry GCM erases the stored credential but never starts a renewal flow. Open since 2.3.2, still present in the 2.5.0 installed here.
The fix, verified
Override the credential helper to
wincredfor this host only, so GCM stays the default everywhere else:Confirmed working end to end: git prompts in the terminal, and forgejo accepts an access token as the password. A token with no expiry set cannot hit the renewal bug.
Getting there took three inconclusive push tests, and the doc now warns about why. Changing the config proves nothing while a credential is still cached — the store gets reused and the push succeeds without ever exercising the new path. Worse, the two helpers use different target names (GCM writes the bare host,
wincredwrites<user>@<host>), so clearing "the" credential can leave one behind and look like a fix that did not take.Also recorded
git.liamjd.netresolves to Cloudflare with only 443 open, and the host answers on no LAN address, so the forgejo container's222:22mapping is never reached. Cloudflare's proxy carries HTTP/HTTPS only. Written down because reaching for SSH first cost a wasted key-generation round trip.fj pr createneeds--headand--baseexplicitly, whereghwould infer them from the checkout.git commit --allow-emptyas the way to test a push without committing a stray file.Note on the commits
Four commits rather than one, and deliberately not squashed: the first records the wrong diagnosis and the second corrects it. Flattening would hide that
provider=genericlooks like the answer and is not, which is the trap worth leaving visible in the history.A
README.mdalso rides along. It began as a throwaway push test — the exact mistake the doc now warns about — but the repo had no README, so rather than revert it, it is now a real one: what the game is, what works today versus what has not been started, how to run and test it, the design constraints that bind the data model rather than the content, and an index ofdocs/. Every link target was checked against the working tree.It also records the two engine traps up front, because they cost time and are not discoverable from the code: adding a
class_nameneeds an editor scan rather than an import pass, and headless renders nothing under GL Compatibility, so a green test suite says nothing about how anything looks.🤖 Generated with Claude Code
https://claude.ai/code/session_012V5CmAgcjna6fBrgZebqjZ
Document the GCM credential failure against forgejoto Document the GCM credential failure, and add a README