GiteaPushMirrorFailing¶
Severity: warning. Fires when the CronJob gitea/github-push-mirror has not completed successfully for 50 minutes, or not since it was created. It runs every 15 minutes and fails when the push it triggers after recreating a failed mirror fails too (a failed push that the new push repairs ends the run Complete), so this means at least three runs in a row failed. Nothing breaks at once, but the GitHub repository behind Flux's bootstrap-cluster GitRepository goes stale, and a Gitea outage would then leave Flux without a current fallback source. This was the 2026-10-20 case (#1375).
Labels: namespace: gitea, cronjob: github-push-mirror.
The reconciler and its two credentials are described on the Flux page: a Gitea access token for the Gitea API, and a GitHub token that Gitea uses for the push. Both come from OpenBao clusters/hetzner-mgmt/gitea/github-mirror through the ExternalSecret gitea/github-mirror-token.
Read-only checks¶
# Which credential fails: the reconciler's log
kubectl --context admin@mgmt-cluster -n gitea get jobs -l batch.kubernetes.io/cronjob-name=github-push-mirror --sort-by=.metadata.creationTimestamp
kubectl --context admin@mgmt-cluster -n gitea logs job/<latest github-push-mirror job>
# Is the secret synced, with both keys?
kubectl --context admin@mgmt-cluster -n gitea get externalsecret github-mirror-token
kubectl --context admin@mgmt-cluster -n gitea get secret github-mirror-token -o jsonpath='{.data}' | jq 'keys'
# Gitea's own view of the push: "Authentication failed for 'https://github.com/...'"
kubectl --context admin@mgmt-cluster -n gitea logs deploy/gitea --since=2h | grep -i -E 'mirror|github' | tail -20
Read the log by its first error:
Gitea unreachable (...)repeated for 14 minutes, thenURLError: Gitea did not accept connections for the whole wait, so checkkubectl --context admin@mgmt-cluster -n gitea get deploy giteaand its pods. A planned stop shorter than 14 minutes does not fail the run. Thegitea-preupgradegate's stop has taken up to 11.5 minutes; its Job'sstatus.startTimeandcompletionTimeshow whether the run fell in one.HTTP Error 401onGET .../push_mirrors: Gitea rejects the reconciler'sgitea-token(revoked, expired, or its user was deleted). The reconciler only fails on a401while Gitea's/api/healthzpasses; it retries a401that comes from a database outage for up toGITEA_WAIT_SECONDS. If the log showsGitea not healthy (HTTP 401)lines first, the run hit that limit: checkgitea-postgresqlbefore the token.403: the token lacks scopewrite:repository, or its user has no admin rights onSkatzi/platform.removing push mirror ... last error: ... Authentication failed, thenbut its push failed: ... Authentication failed, on every run: GitHub rejectsgithub-mirror-token(expired, revoked, or no longer Contents: read and write on the repository).remote: Internal Server Error,(Internal Server Error)or another 5xx in the last error, even after[remote rejected]: GitHub failed on its side, not the token or branch protection. When the same run's re-push logsand pushed, last update ..., the error was transient: the run ends Complete and nothing needs to change. Only a 5xx that also shows inbut its push failed: ...fails the run; when it repeats over several runs, check https://www.githubstatus.com and wait for GitHub to recover. The GitHub 500 incident is an example.protected branch,GH006or a ruleset message in the last error: a GitHub branch protection rule or ruleset blocks the force push; the bootstrap repository must not have one.- Pod not started,
CreateContainerConfigError: a key ofgithub-mirror-tokenis missing; see ExternalSecretNotReady.
Roll forward¶
An agent cannot create either token. Raise an attention item for the owner that names the failing credential and the step:
- Gitea token: as an account with admin rights on
Skatzi/platform, create an access token with scopewrite:repositoryand write it to propertygitea-token. The Gitea backup gate uses the same token for its smoke check (ExternalSecretgitea-scratch/gitea-token), so a revoked token also fails the gate and the restore drill. - GitHub token: create a fine-grained token on
DunkRing/bootstrap-clusteronly, with Contents: read and write, and write it to propertygithub-mirror-token. - Write with
bao kv patch -mount=clusters hetzner-mgmt/gitea/github-mirror <property>=<token>, so the other property is kept, then sync at once:kubectl --context admin@mgmt-cluster -n gitea annotate externalsecret github-mirror-token force-sync=$(date +%s) --overwrite(after a new Gitea token, alsokubectl --context admin@mgmt-cluster -n gitea-scratch annotate externalsecret gitea-token force-sync=$(date +%s) --overwrite).
The next run recreates the mirror with the new GitHub token and triggers a push; when that push works, the run ends Complete and logs and pushed, last update .... To run it now: kubectl --context admin@mgmt-cluster -n gitea create job --from=cronjob/github-push-mirror github-push-mirror-manual. Then check that git ls-remote of both repositories prints the same main SHA.
Roll back¶
Nothing to roll back: the reconciler only touches the push mirror to GitHub. If the failures started with a change to components/gitea/push-mirror/, revert that pull request.