Blogs

GitHub Enterprise Importer

GitHub Enterprise Importer (formerly Octoshift) has been in public beta for some time and many organisations looking to migrate to GitHub Enterprise Cloud or GitHub.com have already been using this tool, so it has been well tested ready for General Availability. Now officially launched by GitHub, it is ready to start migrating your source code.

Microsoft is now focusing on GitHub.com being the way forward for code management, so it makes sense to start moving repositories away from Azure DevOps and bring all code sources into one location. GitHub Enterprise Importer (GEI) enables you to plan and perform self-serve migrations from CLI or through API without losing any of the collaboration attributes. This means you can keep the context of changes to your code, helping to preserve knowledge over time. And it’s not just Azure DevOps it supports, you can bring in GitHub Enterprise Server, Bitbucket Data Center, Bitbucket Server, or other GitHub.com repos if you want to adopt Enterprise Managed users on those repos.

The main attraction of this importer is the simple CLI tool, installable as an extension to the existing GitHub CLI. With the average time of migrating a repo just 70 seconds, this is built to handle bulk migrations and provides feedback on errors, warnings, and updates to ensure you don’t miss any important source data.

To give you an idea of exactly how simple it is, let’s run through the steps it takes to migrate a single Azure DevOps (ADO) repo into GitHub.com

This assumes you have GitHub CLI installed but if you don’t you can find the latest install here: GitHub CLI

  1. Install the GEI CLI. There are 2 separate ones, with one being specific to migration from ADO and this is the one used here. Simply run the following command
gh extension install github/gh-ado2gh
  1. Create Personal Access Tokens (PATs) with access to the ADO org and the GitHub org. Your ADO PAT must have work item (read), code (read), and identity (read) scopes in your ADO org. Your GitHub PAT must have repo (full), admin:org, and workflow (fullSet the ADO_PAT and GH_PAT environment variables

From the GH CLI, ensuring you are in the directory you installed the GEI to:

export ADO_PAT=<paste ADO PAT token here>

export GH_PAT=<paste GH PAT token here>
  1. Run the generate-script command to generate your PowerShell migration script
gh gei generate-script –-github-source-org ORGNAME --github-target-org orgname
  1. This will generate migrate.ps1 which can then be run from your locally installed PowerShell If you don’t already have PowerShell you can install that from here

That’s it! the PS script will migrate the content from ADO to GitHub and depending on the size is likely to take a minute or two to complete. Now obviously migrating years of projects will be more complex and certainly require planning. Fortunately GitHub have also put together a new planning guide which can help you run through all the steps needed.

For further reading on the currently supported GitHub migration paths, head to the documentation here. If you are looking at migrating from Bitbucket, register for the beta program and early next year you should see Bamboo join the party too.

[mailpoet_form id="1"]

Other Recent Blogs

Microsoft Teams IP Phones and Intune Enrollment

Microsoft Teams provides a growing portfolio of devices that can be used as desk and conference room phones. These IP phones run on Android 8.x or 9.x and are required to be enrolled in Intune. By default, these devices are enrolled as personal devices, which is not ideal as users should not be able to enrol their own personal Android devices.

Read More »

Level 9, 360 Collins Street, 
Melbourne VIC 3000

Level 2, 24 Campbell St,
Sydney NSW 2000

200 Adelaide St,
Brisbane QLD 4000

191 St Georges Terrace
Perth WA 6000

Level 10, 41 Shortland Street
Auckland

Part of

Arinco trades as Arinco (VIC) Pty Ltd and Arinco (NSW) Pty Ltd. © 2023 All Rights Reserved Arinco™ | Privacy Policy | Sustainability and Our Community
Arinco acknowledges the Traditional Owners of the land on which our offices are situated, and pay our respects to their Elders past, present and emerging.

Get started on the right path to cloud success today. Our Crew are standing by to answer your questions and get you up and running.