Mapping users from GitHub.com to GitHub Enterprise with LDAP
Many companies use LDAP for managing user access and directory services within their organization. Often a client may choose GitHub Enterprise and wish to use their existing LDAP protocols to manage users on their GitHub Enterprise instance.
When migrating users from GitHub.com to GitHub Enterprise and using LDAP for authentication, we can easily map users to their respective user names.
Scenario
GitHub.com Username
LDAP Username
NitesWatchGuy
jsnow
Khaleesi
dtargaryen
2short4u
tlannister
sclegane
sclegane
DireWolf
[N/A]
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 map the records, 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.
Note that the user "DireWolf" does not have an LDAP username. If you do not wish to migrate a user, you can map the user to "ghost", the reserved account for deleted users.
ldap_users.csv
Use the manifest with the map command
Once the mappings are in place, simply pass them into the map
command.
Last updated