A script to migrate from Gitea to GitLab

Published (click to see context) on 26/11/2020 by Morgan Bazalgette • 1 minute

Migrating between Gitea and GitLab is not straightforward, seeing as they do not provide any import/export functionality which is baked in and compatible.

I created a script which you can find here: It migrates:

The script works by acting directly on the Gitea database (thus prone to break following changes to the schema), is not really well-polished and contains some hard coded configuration. But in general it provides a base to hack on for anyone wanting to do this. As a general tip, it might be useful to just grep for Getenv to get configuration variables, to get hard-coded urls.

If this saved you a couple of days’ work: have fun!