Getting startedQuickstart
Quickstart
Install joflux, set both organizations, export the inventory, then run the remaining stages in order.
Install
Section titled “Install”brew tap netspeedy/jofluxbrew install jofluxmacOS and Linux. If Homebrew refuses the new third-party tap, runbrew trust netspeedy/joflux once, then install again.
git clone https://github.com/netspeedy/joflux.gitcd jofluxpython3 -m venv .venv. .venv/bin/activatepython -m pip install .Python 3.11 or newer, and nothing outside the standard library. For YAML configs, install'.[yaml]' instead of ..
Check it’s on your path:
joflux --versionPoint it at both organizations
Section titled “Point it at both organizations”Copy the example config from the repository and set the GitHub organization you’re moving from and the Forgejo organization you’re moving to:
cp joflux.toml.example joflux.toml[github]org = "my-github-org"
[forgejo]url = "https://codeberg.org"org = "my-forgejo-org"
[migration]poll_interval = 30max_wait_time = 3600log_level = "INFO"output_dir = "migration_output"metadata = trueCreate the target organization on Forgejo before you go further; migrate won’t create it for
you. Then put both tokens in the environment rather than in the file:
export JOFLUX_GITHUB_TOKEN="ghp_your_github_token"export JOFLUX_FORGEJO_TOKEN="your_forgejo_token"Before you migrate covers what each token needs to be able to do.
Export the inventory
Section titled “Export the inventory”export only reads from GitHub, so it’s the safe first step:
joflux --config joflux.toml exportIt lists the organization and saves the inventory:
02:39:52 - INFO - Fetching repositories from GitHub org: my-github-org02:39:52 - INFO - Found 14 repositories02:39:52 - INFO - Inventory saved: migration_output/repos-inventory.json02:39:52 - INFO - Exported 14 repositories (3 private, 1 forks, 1 archived)Read migration_output/repos-inventory.json before going any further, because it’s the list every
later stage works from. If forks or repositories that are already archived shouldn’t move, export
again with a filter:
joflux --config joflux.toml export --exclude-forks --exclude-archivedRun the rest
Section titled “Run the rest”When the inventory is right, run the remaining stages in order, all with the same config:
-
Run the migrations.
migratewaits for Forgejo to finish each one:joflux --config joflux.toml migrate -
Check the ones Forgejo didn’t answer for in time. With none,
monitorexits straight away; otherwise it names the repositories it can’t confirm, for you to check in the Forgejo web UI.joflux --config joflux.toml monitor -
Check what arrived.
verifyexits with code 1 and names any repository that isn’t on the target.joflux --config joflux.toml verify -
Archive the GitHub originals once the report looks right:
joflux --config joflux.toml archive