Improved rake documentation for importing existing repositories with a rake task.
This commit is contained in:
parent
ed9350dc57
commit
e712583a5e
|
@ -11,18 +11,55 @@ Notes:
|
||||||
|
|
||||||
How to use:
|
How to use:
|
||||||
|
|
||||||
1. copy your bare repos under git repos_path (see `config/gitlab.yml` gitlab_shell -> repos_path)
|
1. Create a new folder inside the git repositories path.
|
||||||
1. run the command below
|
|
||||||
|
- For omnibus-gitlab it is located at: `/var/opt/gitlab/git-data/repositories`
|
||||||
|
- For manual installations it is usually located at: `/home/git/repositories` or you can see where
|
||||||
|
your repositories are located by looking at `config/gitlab.yml`:
|
||||||
|
|
||||||
```
|
```
|
||||||
# omnibus-gitlab
|
# 3. Advanced settings
|
||||||
sudo gitlab-rake gitlab:import:repos
|
# ==========================
|
||||||
|
|
||||||
|
# GitLab Satellites
|
||||||
|
# satellites:
|
||||||
|
# Relative paths are relative to Rails.root (default: tmp/repo_satellites/)
|
||||||
|
# path: /home/git/gitlab-satellites/
|
||||||
|
# timeout: 30
|
||||||
|
|
||||||
|
satellites:
|
||||||
|
path: /home/git/gitlab-satellites/
|
||||||
|
gitlab_shell:
|
||||||
|
path: /home/git/gitlab-shell/
|
||||||
|
repos_path: /home/git/repositories/
|
||||||
|
hooks_path: /home/git/gitlab-shell/hooks/
|
||||||
|
upload_pack: true
|
||||||
|
receive_pack: true
|
||||||
|
|
||||||
# installation from source or cookbook
|
|
||||||
bundle exec rake gitlab:import:repos RAILS_ENV=production
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Example output:
|
2. Copy your bare repositories inside this newly created folder, e.g.:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cp /old/git/foo.git /home/git/repositories/new_group/foo.git
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Run the command below depending on you type of installation:
|
||||||
|
|
||||||
|
#### Omnibus Installation
|
||||||
|
|
||||||
|
```
|
||||||
|
$ sudo gitlab-rake gitlab:import:repos
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Manual Installation
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd /home/git/gitlab
|
||||||
|
$ sudo -u git -H bundle exec rake gitlab:import:repos RAILS_ENV=production
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example output:
|
||||||
|
|
||||||
```
|
```
|
||||||
Processing abcd.git
|
Processing abcd.git
|
||||||
|
|
Loading…
Reference in New Issue