viperproject / bitbucket-issue-migration

Scripts for the migration from Bitbucket to GitHub.
23 stars 16 forks source link

Bitbucket To Github Migration

Warning: use at your own risk, comes with no warranty or liability of any kind.

Although the scripts in this repository are mainly targeted at migrating a Bitbucket Mercurial repo to GitHub (using git), this section describes migrating a git repository from Bitbucket to GitHub.

The GitHub access token has to have at least the following privileges: gist, repo, write:discussion.

Mercurial on Bitbucket to git on GitHub Migration

./main.py \
    --github-access-token=<github's personal access token> \
    --hg-fast-export-path=<path to hg-fast-export.sh> \
    --hg-authors-map=migration_data/authors.map \
    --hg-branches-map=migration_data/branches.map \
    [space separated list of bitbucket repositories to migrate]

Alternative manual steps:

This project reuses some code from https://github.com/jeffwidman/bitbucket-issue-migration and https://github.com/fkirc/bitbucket-issues-to-github

Features

This script migrates:

Within a comment:

Install dependencies

pip3 install -r requirements.pip

git on Bitbucket to git on GitHub Migration