Add a push mirror
add_push_mirrorSet up automatic push mirroring from a Forgejo/Codeberg repository to an external Git remote, so changes sync without a local git push.
Instructions
Add a push mirror so Forgejo/Codeberg auto-pushes this repo to an external remote (e.g. a GitHub mirror), keeping it in sync without a local git push. Requires write mode. The push credential is taken from the server's FORGEJO_MIRROR_TOKEN env var — never pass it as an argument; or set use_ssh=true for key auth.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name. | |
| owner | Yes | Repository owner. | |
| use_ssh | No | Authenticate to the remote with an SSH key instead of a password token. When true no username/token is sent and the response carries a `public_key` to add on the remote. | |
| interval | No | Sync interval in Forgejo duration form (e.g. `8h0m0s`; `0` disables periodic sync). Defaults to `8h0m0s`. | |
| branch_filter | No | Optional glob branch filter (e.g. `main,release/*`); empty mirrors all branches. | |
| remote_address | Yes | Target git URL to push to, e.g. `https://github.com/you/repo.git`. | |
| sync_on_commit | No | Also push right after each push to this repo (near-real-time). Defaults to true. | |
| remote_username | No | Username on the remote (e.g. your GitHub username). Required for password auth; ignored when `use_ssh` is true. |