Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrate from github enterprise to github.com

We have a few repositories and forks on a trial version of Github Enterprise. I want to evaluate how to migrate from Github enterprise to Github.com (into a paid for organization, say)

The only resource I found was how to perform the migration in the opposite direction https://help.github.com/enterprise/2.0/admin/articles/moving-a-repository-from-github-com-to-github-enterprise/

I have contacted github.com asking the same questions as below and I am waiting for their response.

  • How do we migrate a repository from github Enterprise to github.com? (fairly certain that a git clone --bare and a git push --mirror will do the job)
  • If I migrate forks as well, how do we make sure that the relationship between the original and forks is maintained?
  • How do I migrate the webhooks and services we configured for our repositories?
  • How do I transfer the Pull requests/Issues? (article I linked to above says we need to use the Github API, I am OK with this solution)
  • Can we migrate teams and users? (guessing, probably not)

Note that we have the backups of the enterprise instance performed using the backup tools provided by github (I think it is called ghe-backup)

Thanks

like image 761
RookiePro Avatar asked Feb 26 '15 21:02

RookiePro


People also ask

What is the difference between GitHub and GitHub Enterprise?

The main difference between the products is that GitHub Enterprise Cloud is hosted by GitHub, while GitHub Enterprise Server is self-hosted. For more information about how businesses can use GitHub's products to support their software development lifecycle, see "About GitHub for enterprises."

How do I move a repository from GitHub to an organization?

On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. Under "Danger Zone", click Transfer. Read the information about transferring a repository, then type the name of the user or organization you'd like to transfer ownership of the repository to.


2 Answers

http://www.alexhadik.com/blog/2016/5/26/migrating-github-repositories-with-gitmover appears to offer a solution: GitMover is "a simple Python script that takes Git repos on any type of GitHub installation, and copies issues, labels and milestones from one to the other. It's the perfect tool to help automate the open-sourcing of an internal project."

like image 182
joeln Avatar answered Oct 05 '22 00:10

joeln


You should be able to use the steps in the linked document in the reverse order as well:

  • Create an empty repository at github.com
  • Create a clone of the enterprise repository on your local.
  • Add github.com as a remote reference on your local clone.
  • Push all references to the github.com repository.
like image 41
Ian Reasor Avatar answered Oct 05 '22 02:10

Ian Reasor