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.
- Python3.
-
(If you plan to use BitBucket) Create BitBucket app password with the
Repositories: Read
,Repositories: Write
andRepositories: Admin
permissions: -
(If you plan to use GitHub) Create GitHub personal access token with the
repo
scopes: -
Clone the tool repo:
$ git clone [email protected]:torunar/repository-migrator.git
- Install dependencies:
$ cd repository-migrator
$ pip3 install -r requirements.txt
$ 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'
$ 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'
$ python3 repository-migrator \
--input=github \
--output=local \
--github-login='Your GitHub login' \
--github-password='Personal access token from Installation step 2'
$ python3 repository-migrator \
--input=bitbucket \
--output=local \
--bitbucket-login='Your BitBucket username' \
--bitbucket-password='App password from Installation step 1'