How to Migrate from Github to Gitlab

Orange Pi Development Boards

Github is by far the most popular web-based hosting service for version control using Git, but it’s not the only option as Gitlab and Bitbucket offer alternatives.

If for whatever reasons, you feel the need to migrate from Github to another service, it’s actually quite easy, and I’ve tried it with Gitlab, which offers a very easy solution to import your code repositories from Github.

First, you’ll need to sign-in to Gitlab. That part does not need explanation. The next step is to go to Settings->Account, and in the Social Sign-in section, connect Gitlab to your Github account.

Gitlab-Connect-to-Github
Click to Enlarge

After logging in to your Github account, youl should be set. Now click on the + icon on the op of the web page, and select New Project.

Gitlab-New-ProjectClick on the Import project tab, and import project from Github.

Gitlab-Import-Project
Click to Enlarge

You’ll be asked to input your Github password again, and be brouhgt to your list of repositories. Now you can simply click on Import all repositories if you wish to do so, or only select the ones you want to import one by one.

Gitlab-Import-Repositories-from-Github
Click to Enlarge

I clicked on Import all repositories, and all my own projects – including the one I forked – could be imported, but I also got an error: “an error occurred while importing project “.  This is for projects I’m a member of, but which are not directly associated to my Github account.

Gitlab-import-failed
Click to Enlarge

For example, imx6-dongle/linux-imx and linux-sunxi/sunxi-tools failed to import. If that’s the case I cannot explain why linux-sunxi/sunxi-bsp was imported successfully however.

Anyway, the import process was easy enough, and you still have all your commits and messages shown in Gitlab.

Gitlab-Commits-Message-After-Import
Click to Enlarge

I think the process is easy enough, but if you have any issues, Gitlab uploaded a video on YouTube to help you out.

Gitlab is free to use if you are limited needs, but they also have paid plans for more demanding requirements. However, XDA Developer has just reported that GitLab Ultimate and GitLab Gold are now free for open source projects and education, so it may be worthwhile to benefit from this offer.

10
Leave a Reply

avatar
6 Comment threads
4 Thread replies
1 Followers
 
Most reacted comment
Hottest comment thread
8 Comment authors
Alexey RoslyakovZoobabTestNoloqoqcrashoverride Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Lalith
Guest
Lalith

Thank you for the timely article..

ayufan
Guest
ayufan

@cnxsoft: “Github” => “GitHub”, “Gitlab” => “GitLab”

Test
Guest
Test

GitLab is hosted by Microsoft (Azure). Yes!

crashoverride
Guest
crashoverride

“GitLab Ultimate and GitLab Gold are now free for open source projects”
“It should not have paid support or paid contributors.”

That pretty much rules out all *useful* open source software! (linux, etc.)

Alexey Roslyakov
Guest
Alexey Roslyakov

So, where are my open source projects I hosted on Gitorious before?

Zoobab
Guest

I have discovered notabug.org, their interface looks slick!

For gitlab, i am testing their kubernetes intégration to an orangepi board at home that runs kubernetes in order to access a serial port in à pod.