0

About this: https://docs.gitlab.com/ce/user/project/import/svn.html

Specifically:

The first step to mirror you SVN repository in GitLab is to create a new empty project which will be used as a mirror. For Omnibus installations the path to the repository will be located at /var/opt/gitlab/git-data/repositories/USER/REPO.git by default. For installations from source, the default repository directory will be /home/git/repositories/USER/REPO.git. For convenience, assign this path to a variable:

What is that REPO.git file? Where did it come from? Am I supposed to do this on our gitlab server itself or can I do it on my local machine?

It says just before to place subgit in /opt but this file is in /var/opt/? And either way there's no such path in the subgit archive...

shinzou
  • 5,850
  • 10
  • 60
  • 124

1 Answers1

0

REPO.git is not a file, it stands here for a repository name. It comes from GitLab itself: when you create a project in GitLab UI, it creates the project directory on the mentioned path. Btw, USER here stands for GitLab username; thus, for example, when you log in to GitLab as, say, 'admin' and create a project called 'project', the correspondent 'project.git' directory is being created at the following location:

/var/opt/gitlab/git-data/repositories/admin/project.git

for Omnibus installation, or

/home/git/repositories/admin/project.git

for installations from source.

All the actions are supposed to be performed on the GitLab server. Regarding /opt and /var/opt: /var/opt is the place where GitLab stores its files, including projects whilst /opt is where SubGit tool is supposed to be installed. SubGit is not a part of GitLab, it's independent tool for SVN to Git translation; it can be obtained here:

https://subgit.com/download.html

and btw, there's another guide how to use SubGit with GitLab:

https://subgit.com/gitlab.html

it could be helpful, too.

ildar.hm
  • 526
  • 2
  • 5
  • So I can't do it on my local machine? Do I have to do it on the gitlab server? – shinzou Apr 06 '18 at 20:11
  • If you intend to import data from SVN to GitLab project -- then yes, you have to perform it on the GitLab server; it's possible though to import data to your local machine, too, yet in this case, it would be just a Git repository, not a GitLab project, find more details in the following manual: https://subgit.com/remote-book.html – ildar.hm Apr 09 '18 at 04:04