log("Check gitlab.yml config for correct gitlab_shell.repos_path variable. \"#{Gitlab.config.gitlab_shell.repos_path}\" does not match\"#{repo_path}\"")
log("Check gitlab.yml config for correct repositories.storages values. No repository storage path matches\"#{repo_path}\"")
GitLab allows you to define repository storage paths to enable distribution of
storage load between several mount points.
## For installations from source
Add your repository storage paths in your `gitlab.yml` under repositories -> storages, using key -> value pairs.
>**Notes:**
- You must have at least one storage path called `default`.
- In order for backups to work correctly the storage path must **not** be a
mount point and the GitLab user should have correct permissions for the parent
directory of the path.
## For omnibus installations
Follow the instructions at https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/configuration.md#storing-git-data-in-an-alternative-directory
| `user_oauth_applications` | boolean | no | Allow users to register any application to use GitLab as an OAuth provider |
| `user_oauth_applications` | boolean | no | Allow users to register any application to use GitLab as an OAuth provider |
| `after_sign_out_path` | string | no | Where to redirect users after logout |
| `after_sign_out_path` | string | no | Where to redirect users after logout |
| `container_registry_token_expire_delay` | integer | no | Container Registry token duration in minutes |
| `container_registry_token_expire_delay` | integer | no | Container Registry token duration in minutes |
| `repository_storage` | string | no | Storage path for new projects. The value should be the name of one of the repository storage paths defined in your gitlab.yml |
```bash
```bash
curl -X PUT -H"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings?signup_enabled=false&default_project_visibility=1
curl -X PUT -H"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/application/settings?signup_enabled=false&default_project_visibility=1
expect{load_validations}.toraise_error('"name with spaces" is not a valid storage name. Please fix this in your gitlab.yml before starting GitLab.')
end
end
context'with nested storage paths'do
beforedo
mock_storages('foo'=>'/a/b/c','bar'=>'/a/b/c/d')
end
it'throws an error'do
expect{load_validations}.toraise_error('bar is a nested path of foo. Nested paths are not supported for repository storages. Please fix this in your gitlab.yml before starting GitLab.')
@@ -44,7 +44,7 @@ describe Projects::ImportService, services: true do
...
@@ -44,7 +44,7 @@ describe Projects::ImportService, services: true do
end
end
it'fails if repository import fails'do
it'fails if repository import fails'do
expect_any_instance_of(Gitlab::Shell).toreceive(:import_repository).with(project.path_with_namespace,project.import_url).and_raise(Gitlab::Shell::Error.new('Failed to import the repository'))
expect_any_instance_of(Gitlab::Shell).toreceive(:import_repository).with(project.repository_storage_path,project.path_with_namespace,project.import_url).and_raise(Gitlab::Shell::Error.new('Failed to import the repository'))
result=subject.execute
result=subject.execute
...
@@ -64,7 +64,7 @@ describe Projects::ImportService, services: true do
...
@@ -64,7 +64,7 @@ describe Projects::ImportService, services: true do
expect_any_instance_of(Gitlab::GithubImport::Importer).toreceive(:execute).and_raise(Projects::ImportService::Error.new('Github: failed to connect API'))
expect_any_instance_of(Gitlab::GithubImport::Importer).toreceive(:execute).and_raise(Projects::ImportService::Error.new('Github: failed to connect API'))