check: the git credential row is missing, and default-branch hides why it matters #97
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Meta/Campaign
Meta/Epic
Meta/Session
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Curated
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Scope/Campaign
Status/Abandoned
Status/Blocked
Status/Conflicted
Status/In Progress
Status/In Review
Status/Need Grooming
Status/Need More Info
Status/Ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Ting/Jostoph#97
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Proposal
Three defects found by chasing one warning that had been dismissed as background noise across five consecutive doctor runs.
The chain
ting:default-branchreportedcould not read HEAD from <url>on every run. It was read as an unreachable-forge / network condition. It was not — it was an auth failure, and two separate bugs conspired to hide that.1.
check's git credential row does not existcheckcarries a 38-line comment explaining, in detail, why the forge needs acredential.https://<forge>.helperrow: HTTPS speaks Basic auth, not bearer; without it git falls through to an interactive askpass and fails outright (found live 2026-08-09). The settings table contains no git row at all — only fourjjones.The proof it was lost rather than never written:
config-getandconfig-setboth implement a"git"scope, and nothing uses it. Dead code with a paragraph of rationale above it.A comment describing a check that is not in the table is worse than no comment, because it reads as coverage.
2.
default-branchthrew the real error away$symref.stderr— which saysfatal: Authentication failed— was discarded. An auth failure and an unreachable forge rendered identically.Its comment also claimed
git ls-remoteneeds no token because HEAD "is public information on a public repo". True for a public repo; most of the estate is not public, so it goes through the credential helper.3. The helper is inert without an exported token
The row reads
$FORGEJO_ACCESS_TOKENfrom the environment (correctly — no secret in git config). But an unexported token makes it answer with an empty password, which Forgejo reports as "Credentials are incorrect or have expired" — a wrong token, not a missing one. That one word is what sent the diagnosis down the wrong path.Specification Delta
check's settings table:[git, 'credential.https://jo.et0.pw.helper', ...], reviving the dead"git"scope.ting:token: warns whenFORGEJO_ACCESS_TOKENis unset, naming the misleading "expired" symptom. Reports length only, never the value.ting:default-branch: carries the last non-empty line of stderr into the warning; comment corrected.config -> token -> remotes.Verification
Against
lar.ad/flake-ops, with the module as apath:input.Token unset:
Token present:
default-branchhas never been green before this change.