Mirror github to Gitlab

githubgitlab

In a local gitlab I created a copy of project nova (https://github.com/openstack/nova).

How do I keep the local nova repo in sync with github, updating maybe once per hour or per day?

I would like a solution similar to what is described here for bitnami:
http://wiki.bitnami.com/Applications/BitNami_GitLab#Keeping_in_sync_with_the_GitLab_repository_at_GitHub

(I used Devstack to install Openstack.)

Best Answer

GitLab now has this feature built-in!
Since GitLab EE 8.2 it's supported. Hooray!

Pulling from a remote respository

You can set up a repository to automatically have its branches, tags, and commits updated from an upstream repository.
...

When creating a new project, you can enable repository mirroring when you choose to import the repository from "Any repo by URL". Enter the full URL of the Git repository to pull from and click on the Mirror repository checkbox.

GitLab auto mirroring
(source: gitlab.com)

>

For an existing project, you can set up mirror pulling by visiting your project's Settings ➔ Repository and searching for the "Pull from a remote repository" section. Check the "Mirror repository" box and hit Save changes at the bottom.
...

Related Topic