Skip to content

Allows you to migrate all your repositories between BitBucket and GitHub

License

Notifications You must be signed in to change notification settings

torunar/repository-migrator

Repository files navigation

Logo

Repository Migrator

Migrates repositories between BitBucket, GitHub, and local storage.

This tool works in both directions, so you can move your GitHub repositories to BitBucket and vice versa.

You can also back up your repositories locally.

Requirements

  • Python3.

Installation

  1. (If you plan to use BitBucket) Create BitBucket app password with the Repositories: Read, Repositories: Write and Repositories: Admin permissions:

    https://bitbucket.org/account/settings/app-passwords/new.

  2. (If you plan to use GitHub) Create GitHub personal access token with the repo scopes:

    https://github.com/settings/tokens/new.

  3. Clone the tool repo:

$ git clone git@github.com:torunar/repository-migrator.git
  1. Install dependencies:
$ cd repository-migrator
$ pip3 install -r requirements.txt

Usage

Migrate from BitBucket to GitHub

$ python3 repository-migrator \
    --input=bitbucket \
    --output=github \
    --bitbucket-login='Your BitBucket username' \ 
    --bitbucket-password='App password from Installation step 1' \
    --github-login='Your GitHub login' \
    --github-password='Personal access token from Installation step 2' 

Migrate from GitHub to BitBucket

$ python3 repository-migrator \
    --input=github \
    --output=bitbucket \
    --bitbucket-login='Your BitBucket username' \ 
    --bitbucket-password='App password from Installation step 1' \
    --github-login='Your GitHub login' \
    --github-password='Personal access token from Installation step 2' 

Back up repositories from GitHub

$ python3 repository-migrator \
    --input=github \
    --output=local \
    --github-login='Your GitHub login' \
    --github-password='Personal access token from Installation step 2' 

Back up repositories from BitBucket

$ python3 repository-migrator \
    --input=bitbucket \
    --output=local \
    --bitbucket-login='Your BitBucket username' \ 
    --bitbucket-password='App password from Installation step 1'  

About

Allows you to migrate all your repositories between BitBucket and GitHub

Topics

Resources

License

Stars

Watchers

Forks

Languages