Skip to content
Migrate repositories from Gitlab to Gogs or Gitea using http
Branch: master
Clone or download
Pull request Compare This branch is 1 commit ahead of micw:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Migration utility for moving from Gitlab to Gogs / Gitea

This tools provides an automated way to copy all repositories in a namespaces from Gitlab to Gogs / Gitea. All tags and branches are copied. Organizations in Gogs are supported as well.


Type python --help for usage information. It will print

usage: [-h] --source_namespace SOURCE_NAMESPACE
                                 [--add_to_organization organization_name]
                                 --source_repo SOURCE_REPO --target_repo
                                 TARGET_REPO [--no_confirm] [--skip_existing]

optional arguments:
  -h, --help            show this help message and exit
  --source_namespace SOURCE_NAMESPACE
                        The namespace in gitlab as it appears in URLs. For
                        example, given the repository address
              , it
                        shows that this repository lies within my personal
                        namespace "harry". Hence I would pass harry as
  --add_to_private      If you want to add the repositories under your own
                        name, ie. not in any organisation, use this flag.
  --add_to_organization organization_name
                        If you want to add all the repositories to an
                        exisiting organisation, please pass the name to this
                        parameter. Organizations correspond to groups in
                        Gitlab. The name can be taken from the URL, for
                        example, if your organization is http://mygogs-
                        pass my-awesome-organisation here
  --source_repo SOURCE_REPO
                        URL to your gitlab repo in the format
  --target_repo TARGET_REPO
                        URL to your gogs / gitea repo in the format
  --no_confirm          Skip user confirmation of each single step
  --skip_existing       Skip repositories that already exist on remote without
                        asking the user
  --use_ssh             Use ssh to pull/push files to repos


This tools was written for Python 3 using the requests, json, subprocess, and argparse modules.

You can’t perform that action at this time.