esunar
esunar

Reputation: 318

How to clone existing repos to a group in gitlab

I've a fresh gitlab setup and everything is working perfect. And I've several existing repositories(each has thousands of commits and tens of branches) that I want to import to gitlab. I've a folder structure of bare repos like

-operators
--xxxxx.git
--yyyyy.git
--zzzzz.git

--offices
--xxxxx1.git
--yyyyy2.git
--zzzzz3.git

and so on

what I want to do is create first level folders as groups and second level folders as projects. Is it possible to do this in gitlab import?

I've checked this https://github.com/gitlabhq/gitlabhq/wiki/Export-existing-repositories-to-gitlab but it does not work as I expected. It just creates first level git repos.

Upvotes: 3

Views: 6432

Answers (1)

VonC
VonC

Reputation: 1326766

On the server, GitLab manages itself the layout for storing repositories.

So, the notion of "groups of repositories" (that you find in gitolite, the authorization layer used by gitlab) has nothing to do with the actual directory organization used to store those same repos.

When gitlab creates a repo, it delegates that creation to gitolite, which will store it in (by default) in ~/repositories.
(which is why the page "Export existing repositories to gitlab" mentions /home/git/repositories)

Upvotes: 2

Related Questions