3ef4f74b1a
This adds counters for build artifacts and LFS objects, and moves the preexisting repository_size and commit_count from the projects table into a new project_statistics table. The counters are displayed in the administration area for projects and groups, and also available through the API for admins (on */all) and normal users (on */owned) The statistics are updated through ProjectCacheWorker, which can now do more granular updates with the new :statistics argument.
1.7 KiB
1.7 KiB
GitLab Git LFS Administration
Documentation on how to use Git LFS are under Managing large binary files with Git LFS doc.
Requirements
- Git LFS is supported in GitLab starting with version 8.2.
- Users need to install Git LFS client version 1.0.1 and up.
Configuration
Git LFS objects can be large in size. By default, they are stored on the server GitLab is installed on.
There are two configuration options to help GitLab server administrators:
- Enabling/disabling Git LFS support
- Changing the location of LFS object storage
Omnibus packages
In /etc/gitlab/gitlab.rb
:
gitlab_rails['lfs_enabled'] = false
# Optionally, change the storage path location. Defaults to
# `#{gitlab_rails['shared_path']}/lfs-objects`. Which evaluates to
# `/var/opt/gitlab/gitlab-rails/shared/lfs-objects` by default.
gitlab_rails['lfs_storage_path'] = "/mnt/storage/lfs-objects"
Installations from source
In config/gitlab.yml
:
lfs:
enabled: false
storage_path: /mnt/storage/lfs-objects
Storage statistics
You can see the total storage used for LFS objects on groups and projects in the administration area, as well as through the groups and projects APIs.
Known limitations
- Currently, storing GitLab Git LFS objects on a non-local storage (like S3 buckets) is not supported
- Currently, removing LFS objects from GitLab Git LFS storage is not supported
- LFS authentications via SSH was added with GitLab 8.12
- Only compatible with the GitLFS client versions 1.1.0 and up, or 1.0.2.
- The storage statistics currently count each LFS object multiple times for every project linking to it