CLI tool for migrating Bitbucket repositories to GitHub Enterprise
Project description
bb2gh
Bitbucket to GitHub migration tool. Migrate repositories with full metadata preservation, including Pull Requests, comments, user attribution, and secrets.
Features
- Terraform-inspired workflow:
discover->plan->migrate->validate - Full metadata preservation: Git history, branches, tags, PRs, comments, user attribution
- LFS support: Automatic detection and migration of LFS objects
- Secrets migration: Assisted secrets migration via Infisical integration
- Enterprise ready: Supports GitHub Enterprise Cloud, Data Residency, and Enterprise Server
- Resilient: Checkpoint and resume capability, plus rollback options
Requirements
- Python 3.11 or newer
gitandgit-lfsavailable inPATH
Installation
# Using pipx (recommended for CLI tools)
pipx install bb2gh
# Using pip
pip install bb2gh
PyPI and GitHub Releases are the supported public release channels.
The private repository builds the hardened bundle, and the public repository owns the visible GitHub Release and PyPI publication for that exact wheel.
If you need the exact published wheel, download it from GitHub Releases and verify it with the release checksums:
# Linux
sha256sum -c SHA256SUMS
# macOS
shasum -a 256 -c SHA256SUMS
On Windows PowerShell, use Get-FileHash for the downloaded wheel and compare
it with the matching entry in SHA256SUMS.
Source-install from the public repository is unsupported in the hardened public release path. Homebrew is paused until a hardened formula exists.
Setup
Option 1: Interactive login
# Install with keyring support
pip install bb2gh[secure]
# Run interactive setup
bb2gh auth login
# Verify your setup
bb2gh auth status
Option 2: Environment variables
# Bitbucket
export BB_USERNAME=your-username
export BB_API_TOKEN=your-api-token
# GitHub
export GH_TOKEN=ghp_your-token
Required permissions
Bitbucket API token scopes: repository:read, pullrequest:read
GitHub PAT permissions: Contents (write), Pull requests (write), Administration (write), Metadata (read)
Quick Start
# 1. Discover your Bitbucket workspace
bb2gh discover --workspace my-company --output inventory.json
# 2. Generate a migration plan
bb2gh plan --inventory inventory.json --target-org my-gh-org --output plan.json
# 3. Execute the migration
bb2gh migrate --plan plan.json
# 4. Validate the migration
bb2gh validate --migration mig_xxx
Documentation
Full documentation is available at n8-group.gitbook.io/bb2gh.
- Getting Started Guide
- Command Reference
- Configuration Reference
- User Mapping Guide
- Enterprise Features
Reporting Issues
- Bug reports: https://github.com/n8group-oss/bb2gh/issues/new?template=bug_report.yml
- Feature requests: https://github.com/n8group-oss/bb2gh/issues/new?template=feature_request.yml
- Security vulnerabilities: https://github.com/n8group-oss/bb2gh/blob/main/SECURITY.md
License
Business Source License 1.1. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bb2gh-0.20.0-py3-none-any.whl.
File metadata
- Download URL: bb2gh-0.20.0-py3-none-any.whl
- Upload date:
- Size: 393.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4775a4ef77f0abb07da41c9a78ca4867ef6d2e3df08ef065ba2a28e697092c81
|
|
| MD5 |
6206e401d6f6e4efbf76affe1fc2f15c
|
|
| BLAKE2b-256 |
c4b44a2044190a3f3d59dd24ea50d3e230f821c41cb45fe4effd5478d3bc5b57
|
Provenance
The following attestation bundles were made for bb2gh-0.20.0-py3-none-any.whl:
Publisher:
publish-bundle.yml on n8group-oss/bb2gh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bb2gh-0.20.0-py3-none-any.whl -
Subject digest:
4775a4ef77f0abb07da41c9a78ca4867ef6d2e3df08ef065ba2a28e697092c81 - Sigstore transparency entry: 1139275931
- Sigstore integration time:
-
Permalink:
n8group-oss/bb2gh@7ec64d5ae153f835f149938d16180a14bbc89cef -
Branch / Tag:
refs/heads/main - Owner: https://github.com/n8group-oss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-bundle.yml@7ec64d5ae153f835f149938d16180a14bbc89cef -
Trigger Event:
repository_dispatch
-
Statement type: