Importing existing repositories directly from the repositories path requires clarification.
Created by: tnarik
Related to #3693 (closed), #3297 (closed), #2932, #3636 (closed), #3926 (closed) and https://github.com/gitlabhq/gitlabhq/wiki/Import-existing-repositories-into-GitLab.
The way I see it:
- Bare repositories copied to /home/git/repositories and imported with 5.x are not copied but just created inside the 'admin' namespace
For instance:
/home/git/repositories/repo.git
will be left there and a new and empty/home/git/repositories/admin/repo.git
will be created. - Instead, if #2932 is used to patch the system, the repository will be used as is.
For instance:
/home/git/repositories/repo.git
will be added to GitLab and files will be available. -
rake gitlab:import:repos
(from 5.2) only works from /home/git/repositories, not any subfolder, so without any changes, it will create empty repos under the 'admin' namespace. Then the existing repositories can be moved on top of the new ones, replacing for instance the empty/home/git/repositories/admin/repo.git
with the contents of/home/git/repositories/repo.git
, which will make files available.
It would be great if the wiki is updated to reflect the current solution (which as far as I know is as described in 3.) and additionally the way forward is described (commit 5f9d78fdff746a0b50313cf415acac809569a186 is meant to allow importing of repositories inside namespaces [and it works in spite of displaying an error because it cannot create the 'admin' group], but it doesn't seem to take care of the global namespace, for what I saw).