Stay Ready to Leave GitHub

Keep your exit hatch open

GitHub can change pricing, authentication rules, or terms without notice. With Gitea Mirror running, you always have a live copy of code and metadata inside infrastructure you control—so switching to self-hosted Gitea, Forgejo, or something else becomes a DNS change, not a fire drill.

Requirements

Step-by-step

1. Mirror everything continuously

2. Simulate a cutover

  1. Pick a pilot team.
  2. Ask them to work exclusively out of the Gitea mirror for a sprint.
  3. Capture feedback about permissions, webhooks, CI integrations, and adjust.

3. Keep integrations dual-homed

4. Document the flip procedure

5. Keep a second copy on a different host

Since 3.31 the destination does not have to be Gitea. Forgejo is a named destination, and GitHub and GitLab are push destinations (all three beta). A second Gitea Mirror account with a GitLab group as its destination gives you a copy on a different company’s infrastructure at no extra cost, and the push engine keeps it identical to the source on every sync. Each account has one source and one destination, so run one account per direction. See Mirror to GitHub or GitLab.

6. Watch for drift

Success criteria

FAQ

How do I confirm the mirror is still catching new repositories?

Check the Configuration → Connections screen for the Last imported timestamp and ensure the scheduler in Automation is enabled. Auto-discovery runs with each scheduled sync.

What interval should I run before a potential cutover?

Keep Automatic syncing at 15–30 minutes for active organizations. That keeps the lag well under an hour if you have to pivot suddenly.

Can I script the cutover?

Yes. Use the /api/export configuration JSON and the repositories CSV export to generate runbooks, then pair them with infrastructure-as-code (DNS, reverse proxy, CI) so flipping endpoints becomes repeatable.