ForgePort: migrate your repositories from GitHub to OpenCommit
Publication date: 2026-09-19
We know that the biggest hurdle to moving away from GitHub isn’t necessarily ideology, it’s quite often logistics. Migrating one repository by hand is doable. Especially with Forgejo’s excellent UI based migration tool. Migrating dozens, or your entire account, is a weekend of clicking, waiting and double-checking that nothing got lost.
So today we’re launching ForgePort, a small CLI tool that migrates repositories from GitHub to the OpenCommit platform. Whether you want to bring over a single project or bulk-migrate every repo from a user or organization, ForgePort does the heavy lifting for you.
Get it here: https://opencommit.eu/opencommit/forgeport
Take the whole account, not just one repo
ForgePort reads all of its configuration from a single YAML file in the directory where you run it. Each repository is migrated one at a time through the Forgejo migration API, with a short random pause between migrations so we don’t overload the destination server.
Point it at one repository and it migrates one:
2026/01/01 12:00:00 migrating https://github.com/foo/bar -> opencommit/bar
2026/01/01 12:00:05 migrated: https://opencommit.eu/opencommit/bar
Or give it a single user/org name and it expands that into every source (non-fork) repository for that account, then works through the list. Forks are always excluded, and you can control whether private and archived repositories are included or not.
What gets migrated is entirely up to you: issues, pull requests, milestones, labels, wiki, releases and more can each be turned on or off per repository, or set once in a defaults section and inherited everywhere. Please note that if you choose to migrate an entire user or org’s set of repositories, you can only set options as defaults not per repo. If you wish to have more control, you will need to provide a list of repos and their options in the configuration file.
Take a test run with -dryrun
Not sure what you’re about to move? ForgePort has a -dryrun flag that resolves every repository (including user/org expansion) and prints exactly what would be migrated, without contacting OpenCommit at all. Run it, review the list, and only then migrate for real.
Reasoning with secrets in mind
Migration needs tokens: a GitHub personal access token for the source repositories and an OpenCommit (Forgejo) API token for the destination. Both can live in your environment (GITHUB_TOKEN, FORGEJO_TOKEN) or in the config file, with the environment winning. Because the config may contain secrets, it is git-ignored. Never commit migrate.yaml if it contains secrets.
Just getting started
ForgePort is written in Go and built on our own Forgejo SDK. You can grab a pre-built binary or build it from source (requires Go 1.26 or later). It’s distributed under the EUPL-1.2 license, and while we built it for OpenCommit, it should be usable to migrate to any Forgejo-based platform — just point it at your destination’s URL. We welcome pull requests for feature additions and improvements.
One honest limitation for now: ForgePort does not migrate packages. You’ll need to handle those yourself, for example with Skopeo and a small bash script.
We hope ForgePort removes one more excuse for staying put. Your code deserves a home that shares your values, and moving in just got a lot easier.
For the full configuration reference, check out the ForgePort repository.