Configure the Gitea to GitHub push mirror (when GitHub is chosen) #12

Open
opened 2026-10-05 07:48:15 +02:00 by Tirsvad · 0 comments
Owner

Skip this step when GitHub was not chosen. Otherwise call POST /repos/{owner}/{repo}/push_mirrors with remote_address (the GitHub HTTPS URL built from GITHUB_WEB_URL and the GitHub owner, without credentials), remote_username (GITHUB_USER), remote_password (GITHUB_PAT), an interval and sync_on_commit. Gitea has a known issue where sync_on_commit can be ignored on API creation, so read the result back, trigger push_mirrors-sync, and report the effective setting. The PAT needs push access to the target repository (classic repo scope, or a fine-grained token with Contents write). Stop with a clear error if it is missing. Confirm the mirror feature is enabled on the Gitea server.

Phase: MIL-002
Reference: [UC-001]

Skip this step when GitHub was not chosen. Otherwise call `POST /repos/{owner}/{repo}/push_mirrors` with `remote_address` (the GitHub HTTPS URL built from `GITHUB_WEB_URL` and the GitHub owner, without credentials), `remote_username` (`GITHUB_USER`), `remote_password` (`GITHUB_PAT`), an interval and `sync_on_commit`. Gitea has a known issue where `sync_on_commit` can be ignored on API creation, so read the result back, trigger `push_mirrors-sync`, and report the effective setting. The PAT needs push access to the target repository (classic `repo` scope, or a fine-grained token with Contents write). Stop with a clear error if it is missing. Confirm the mirror feature is enabled on the Gitea server. Phase: MIL-002 Reference: [UC-001]
Tirsvad added this to the MIL-002 Repositories and Mirror milestone 2026-10-05 07:48:15 +02:00
Sign in to join this conversation.