Configure Forgejo push mirrors to GitHub fleet-wide (retire manual mirror syncs) #309

Open
opened 2026-06-12 10:23:36 +00:00 by coilysiren · 0 comments
Owner

The 2026-06-12 fleet mirror sync (agentic-os-kai#662) found GitHub mirrors stale or diverged on most repos, and several fell behind again within hours of being synced. Root cause: nothing pushes Forgejo main to GitHub automatically - mirrors only advance when a human or agent pushes by hand.

Forgejo has native push mirroring (repo settings -> repository -> mirror settings, or POST /repos/{owner}/{repo}/push_mirrors with a GitHub token). Proposal: an ansible role (or a script in infrastructure) that walks the catalog and ensures every Forgejo repo with a GitHub twin has a push mirror configured, interval ~8h. That retires manual mirror syncs entirely, leaving scripts/sync-github-mirrors.sh (agentic-os-kai) for divergence repair only.

Note the interaction with GitHub rulesets: push mirroring force-pushes, so repos with non_fast_forward rules (coily, otel-a2a-relay, session-lattice, cli-guard) need the mirror token in the ruleset bypass list or the rules relaxed.

The 2026-06-12 fleet mirror sync (agentic-os-kai#662) found GitHub mirrors stale or diverged on most repos, and several fell behind again within hours of being synced. Root cause: nothing pushes Forgejo main to GitHub automatically - mirrors only advance when a human or agent pushes by hand. Forgejo has native push mirroring (repo settings -> repository -> mirror settings, or POST /repos/{owner}/{repo}/push_mirrors with a GitHub token). Proposal: an ansible role (or a script in infrastructure) that walks the catalog and ensures every Forgejo repo with a GitHub twin has a push mirror configured, interval ~8h. That retires manual mirror syncs entirely, leaving scripts/sync-github-mirrors.sh (agentic-os-kai) for divergence repair only. Note the interaction with GitHub rulesets: push mirroring force-pushes, so repos with non_fast_forward rules (coily, otel-a2a-relay, session-lattice, cli-guard) need the mirror token in the ruleset bypass list or the rules relaxed.
coilyco-ops added
P3
and removed
P1
labels 2026-07-09 21:57:13 +00:00
Sign in to join this conversation.
No description provided.