Migrate from Forgejo
Codebahn is built on Forgejo, so this is the closest migration. Code, issues, pull requests, labels, milestones, and releases carry over through the web UI or the codebahn CLI. Your workflow files come across with your git history and run on Codebahn’s hosted EU runners.
Prerequisites
Section titled “Prerequisites”- A Codebahn account with an organization (see getting started)
- An access token on your source Forgejo or Gitea instance (see below)
- Git installed locally
Create an access token
Section titled “Create an access token”On your source instance, go to Settings > Applications and generate a token with:
| Permission | Level |
|---|---|
| repository | Read |
| issue | Read |
The repository scope covers files, pull requests, and releases. The issue scope covers issues, labels, and milestones. You need both for a full import. On Forgejo v15.0+, you can scope the token to specific repositories. Copy the token value; it is shown once.
Import via the web UI
Section titled “Import via the web UI”-
In Codebahn, click + > Import repository > Forgejo
-
In Clone URL, paste the HTTPS URL of your repository (
https://your-instance.org/your-org/your-repo.git) -
Paste your access token
-
Select what to import: issues, pull requests, labels, milestones, releases
-
Choose your org as the owner, confirm the name, and click Migrate repository
This is a one-time import. The Codebahn repository is independent of your source instance afterward. The import does not carry over teams or permissions; re-create access control on the Codebahn side. For the field-by-field migration options, see the upstream Forgejo docs.
Point your local clone at Codebahn:
git remote set-url origin git@codebahn.net:your-org/your-repo.gitImport with the CLI
Section titled “Import with the CLI”The codebahn CLI can import from any Forgejo or Gitea instance. Install the CLI first. Pass the access token with --source-token.
Single repo
Section titled “Single repo”codebahn repo import your-instance.org/your-org/your-repo --source-token $FORGEJO_TOKENBy default, the CLI imports issues, pull requests, labels, milestones, and releases. To skip specific metadata:
codebahn repo import your-instance.org/your-org/your-repo --source-token $FORGEJO_TOKEN --no-issues --no-prsEntire organization
Section titled “Entire organization”codebahn repo import your-instance.org/your-org --owner my-codebahn-org --source-token $FORGEJO_TOKEN -yUse --include and --exclude with glob patterns to select repos.
CI workflows
Section titled “CI workflows”Your workflows carry over with your git history and should run unchanged. Codebahn scans .forgejo/workflows/, .github/workflows/, .codebahn/workflows/, and .gitea/workflows/; see Workflow directories for precedence.
Hosted runners answer to ubuntu-latest (alias for codebahn-small), codebahn-medium, and codebahn-large. If a workflow targets a custom runner label, register a BYO runner with that label or change runs-on.
Codebahn cancels in-progress runs when you push a new commit to the same branch (this is the default, unlike GitHub). To let every run finish, override it:
concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: falseSee Set up CI for runner specs, minute counting, and the toolchains pre-cached in the job image.
Migrate an organization
Section titled “Migrate an organization”CLI: import an entire org in one command. See Import with the CLI above.
Web UI: run one migration per repository with the org as the owner.
API: script it against the migration API.
Invite your team to the org with a team invite after the repos are in.
Troubleshooting
Section titled “Troubleshooting”“Authentication failed” or 401. The token is expired or missing repository read. Generate a new one.
“Not found” or 404. The token can’t access this repository. If you scoped it to specific repos, confirm this one is in the list.
Issues or pull requests missing. The token needs issue read. Create a token with both scopes and re-run the migration.
Fallback: manual push
Section titled “Fallback: manual push”If the import does not fit your situation, clone and push by hand:
git clone --bare https://your-instance.org/your-org/your-repo.gitcd your-repo.gitgit push --mirror git@codebahn.net:your-org/your-repo.gitThis moves code and branches only. Issues, pull requests, and releases are not included.
Leaving Codebahn later
Section titled “Leaving Codebahn later”You are never locked in. From Org Settings > Export you can pull a tar.gz of every repo plus its issues, pull requests, labels, milestones, and releases, any time. See Export your data for what’s in the archive and how to restore it.

