Git Product home page Git Product logo

migrategitlabtogogs's Introduction

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.

Usage

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

usage: migrate_gitlab_to_gogs.py [-h] --source_namespace SOURCE_NAMESPACE
                                 [--add_to_private]
                                 [--add_to_organization organization_name]
                                 --source_repo SOURCE_REPO --target_repo
                                 TARGET_REPO [--no_confirm] [--skip_existing]
                                 [--use_ssh]

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
                        http://mygitlab.com/harry/my-awesome-repo.git, it
                        shows that this repository lies within my personal
                        namespace "harry". Hence I would pass harry as
                        parameter.
  --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-
                        repo.com/org/my-awesome-organisation/dashboard then
                        pass my-awesome-organisation here
  --source_repo SOURCE_REPO
                        URL to your gitlab repo in the format
                        http://mygitlab.com/
  --target_repo TARGET_REPO
                        URL to your gogs / gitea repo in the format
                        http://mygogs.com/
  --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

Requirements

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

migrategitlabtogogs's People

Contributors

duckthom avatar micw avatar up2early avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.