gitea-to-github
Migrate organizations and repositories from Gitea to GitHub with ease.
Features
- π Migrate entire organizations with all repositories
- πΊοΈ Interactive org-to-org/user mapping
- πΎ Saves configuration for repeated runs
- π Preserves repository visibility (public/private)
- π¦ Maintains full git history, branches, and tags
- π§ͺ Dry-run mode for safe testing
Requirements
gh- GitHub CLI (authenticated)git,curl,jq- Gitea personal access token with read permissions
Usage
# Make executable chmod +x migrate-gitea-to-github.sh # Run migration (interactive setup on first run) ./migrate-gitea-to-github.sh # Dry-run mode (preview without making changes) ./migrate-gitea-to-github.sh --dry-run # Force real migration (skip safety prompt) ./migrate-gitea-to-github.sh --no-dry-run
Configuration
After first run, settings are saved to ./gitea-migration-config.yml:
gitea: url: "https://your-gitea-instance.com" token: "your-token-here" mappings: - gitea: "source-org" github: "target-org-or-username"
How it works
- First run: Enter Gitea URL and token, map each org to GitHub target
- Subsequent runs: Uses saved config, just press Enter to proceed
- Migration: Clones each repo with
--mirrorand pushes to GitHub
Safety
- Defaults to dry-run mode
- Shows preview before migrating
- Skips existing repositories (with option to overwrite)