Importing git repositories from a git server


I had a crash with a previous install of gitlab.
I copied old repos hashed structure somewhere else, I installed a new instance of gitlab and now I need to import old repos it to the new instance.

I build a python script to generate a manifest.xml file by crawling the config files of the directory structure.

     <remote review="git://localhost:54560" />
     <project path="default/project1" name="repositories/@hashed/e6/29/e629fa6598d732768f7c726b4b621285f9c3b85303900aa912017db7617d8bdb.git" />
<!-- more projects -->

I run “git daemon” to serve all directories.

I thought import from manifest would be able to get data from a git server but It fails. I can see from the server log that gitlab did not reach the git server.
If I issue a :

git clone git://localhost:54560/repositories/@hashed/e6/29/e629fa6598d732768f7c726b4b621285f9c3b85303900aa912017db7617d8bdb.git

It works fine so the issue looks like gitlab manifest feature cannot use git protocol to import data.

So what’s the good way to import a bunch of repos files. Of course, I can create manually repos and push data to them but it will be long and error prone.