Reputation: 1949
I have a couple of private repositories where I am the only contributor under Github Enterprise through my university. I am wondering, how can I add my GitHub open (personal) account as a contributor, or alternatively move the repositories from the Enterprise to the Github Open account?
I am aware of where to go to add collaborators, but I cannot find my Github Open username when I search it in the Enterprise github.
Thanks in advance
Upvotes: 1
Views: 1628
Reputation: 11
Anyone reading into transferring "GitHub Enterprise" repository in 2022, there has been an update in GitHub which enables you to transfer the project only using GitHub pages (Enterprise & Personal) and avoids using CMD (command prompt).
Doing this step will automatically cast contributors (If their account is linked to a personal one as well as the Enterprise account), issues & history of the project to your new repository.
Steps to Complete it:
Go to your "Personal GitHub account"
Make a new repository -> select a name that you wish the project to be called.
Do not add any " Git ignore / read.me files into your project (It has to be empty!) & Select it to be a public repository.
On the empty project page, scroll down to " Import Code " click on it.
Opens up with a new page, where you are required to enter your "GitHub Enterprise link https://enterprise.name.ac.uk/MyProject.git <-- This will be different for you!
Press " Begin Import "
Which will then prompt you with a log in for (GitHub Enterprise account), which you are required to enter correctly for it to work, once entered it should start importing
You are then prompted with a panel asking which of the projects you would like to import attached to your Enterprise URL, select one of them and click " Submit ".
Once the transfer has finished you will get an e-mail that states that the import has been finished which provides you with a link to your new repository page!
Enjoy!
Further Read into Official Github Importing Steps.
Upvotes: 1
Reputation: 16836
You can accomplish this by:
remote
to your local copy of your Enterprise repo,Once you've created your new personal repo, grab its URL like so:
Then, using the command line, cd
into your local copy of your Enterprise repo and ensure it's up-to-date via git checkout master
and git pull origin master
(or whatever your desired master branch is named).
Run this command to add your new public GitHub repo as a remote
repository:
git remote add public https://github.com/user/repo.git
Finally, do a force push to your public GitHub repo to push all of your Enterprise repo's contents to it:
git push -f public
Upvotes: 1