Consolidating users from GitHub.com to GitHub Enterprise

Some users may have multiple accounts on GitHub.com that they want to consolidate into a single user on GitHub Enterprise

Scenario

GitHub.com Username

GitHub Enterprise Username

mhysa

dtargaryen

Khaleesi

dtargaryen

motherofdragons

dtargaryen

Prerequisites

This playbook assumes that you have performed the beginning of a migration and have reached the "Map records and resolve conflicts" step.

Generate a mapping manifest

In order to consolidate the users, simply create a CSV file with mapping instructions to give to ghe-migrator. If users do not already exist on the GitHub Enterprise instance, they will be created and immediately suspended.

user_mapping.csv

model_name,source_url,target_url,recommended_action
user,https://github.com/mhysa,https://ghe.example.com/dtargaryen,map
user,https://github.com/Khaleesi,https://ghe.example.com/dtargaryen,map
user,https://github.com/motherofdragons,https://ghe.example.com/dtargaryen,map

Use the manifest with the map command

Once the mappings are in place, simply pass them into the map command.

ghe-migrator map -i /home/admin/user_mapping.csv -g $MIGRATION_GUID

Last updated