Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript
1.5 KB
Raw Blame

kind: fix

gbrain git commit-push (and the post-commit hook, scripts/brain-commit-push.sh and autopilot's git reconcile, which run it) now stops at once when the Git host refuses a push with "Repository not found" (HTTP 404, what a host tells an account that cannot see a private repository) or HTTP 403: it exits 1 with the new code push_credential_refused, class host_only, not retryable, instead of exit 4 with push_unconfirmed, which every caller read as "try again later" while commits stayed on this machine. The message names the credential helpers git asked, in the order it asked them, with the scope (system, global, local) and config file of each, which one answered and the account login it gave; it never prints or stores the secret. Until a push lands, doctor git_convergence warns about that checkout at once instead of after six hours, and put_page's lastPushStatus reads needs_attention. A script that branched on exit 4 to retry now sees exit 1 for this case: relay the message to the user, who makes git use a credential for an account that can push there, then run gbrain git commit-push --push-only. A dropped connection or any other failure keeps push_unconfirmed and exit 4, with the same retries as before. The same refusal over SSH ("ERROR: Repository not found.", "ERROR: Permission to ... denied") is classified too; there git asks no credential helper, so the message says the key ssh offers decides the account. A managed worktree's own Git-effect pushes keep their current retry.