Skip to content
Ditchly
Menu

Last checked November 23, 2026

Migrate from GitHub to Forgejo

We earn commissions when you shop through the links below.

Keep a bare clone, then use Forgejo's New migration on one repository. Issues and pull requests need the form. A mirror only copies Git. Actions secrets do not move.

How long: An afternoon for a handful of repositories once the server is already up. Longer when you are also installing Forgejo and rewriting Actions.

Take it out

  1. Step 1

    Keep a bare clone

    While you still have access, run git clone --bare on the repository and keep that folder. A later git push --mirror copies branches and tags. It does not copy issues, pull requests, the wiki, or stars. The bare clone is the rollback if the web migration fails.

  2. Step 2

    Make a token if the repo is private or has issues

    Forgejo's mirror help says the password field can be an access token. On GitHub, open Settings, then Developer settings, then Personal access tokens. A classic token with the repo scope can read a private repository and its issues. Delete the token when the move is done. Do not paste it into an issue.

  3. Step 3

    Write down what is not in Git

    List repositories that use Actions, a wiki, or private issues. Secrets have to be typed again on the Forgejo side. GitHub's dependency graph, Discussions, and stars are not in the Git repository.

Put it in

  1. Step 1

    Install Forgejo, or use an instance you already trust

    Forgejo is the software you run. There is no company-hosted Forgejo plan on the project site. Codeberg is one public instance run by a separate association. For a private move, follow Forgejo's install docs and put it on a host you control. https://forgejo.org

  2. Step 2

    Migrate one repository from the plus menu

    Forgejo's first-repository doc says open the plus menu, then New migration, pick the service you are importing from, and follow the form. Choose GitHub, paste the repository URL, and add the token if the repo is private. Leave the mirror box unchecked unless you want Forgejo to keep pulling from GitHub. The mirror help says you can only make a pull mirror for a repository that does not exist yet, and you cannot turn an existing repository into a pull mirror later. https://forgejo.org/docs/latest/user/getting-started/first-repository/ https://forgejo.org/docs/latest/user/repo-mirror/

  3. Step 3

    Read one issue and one pull request

    Forgejo's migration code can bring issue and pull-request comments, and the form filters that by the options you leave on. Open one old issue and one pull request before you migrate the next repo. If they are empty, stop. A bare mirror will not fill them in afterward.

Need a server? DigitalOcean is one simple option. Railway is another.

We are a DigitalOcean affiliate.

We may earn from this Railway link.

What you lose

  • Actions are files, not runners

    Workflow files in the Git history can come across. GitHub-hosted runners, Actions secrets, and marketplace actions that only exist on GitHub do not. Forgejo Actions can read a GITHUB_STEP_SUMMARY file for compatibility, which is not the same as running the GitHub marketplace. Register your own runner, and recreate secrets in the repository settings. Do not put a secret in a ticket.

  • Stars, Discussions, and the dependency graph

    Those stay on GitHub. People need new accounts on the Forgejo instance. Teams and repository permissions are set again. A push mirror back to GitHub, if you still want one, force-pushes. Forgejo's mirror page says that overwrite is what the button does.

  • Do not delete GitHub in the middle

    Migrate one repository, check the default branch, an old tag, an issue, and a pull request, then do the rest. Cancel the GitHub plan only after the copy you care about is on a disk you control as well as on the new forge.

Prices for GitHub, and the other forges on the same checklist, are on the GitHub alternatives page. Forgejo is free software. https://github.com/pricing

Also see

https://ditchly.co/migrate/github-to-forgejo