2015-11-23 09:18:59 -05:00
|
|
|
# GitLab Git LFS Administration
|
2015-11-20 10:10:08 -05:00
|
|
|
|
|
|
|
Documentation on how to use Git LFS are under [Managing large binary files with Git LFS doc](manage_large_binaries_with_git_lfs.md).
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
* Git LFS is supported in GitLab starting with version 8.2.
|
2015-11-23 09:18:59 -05:00
|
|
|
* Users need to install [Git LFS client](https://git-lfs.github.com) version 1.0.1 and up.
|
2015-11-20 10:10:08 -05:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
2016-03-03 11:21:32 -05:00
|
|
|
Git LFS objects can be large in size. By default, they are stored on the server
|
|
|
|
GitLab is installed on.
|
2015-11-20 10:10:08 -05:00
|
|
|
|
|
|
|
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`:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
gitlab_rails['lfs_enabled'] = false
|
2016-03-24 10:58:13 -04:00
|
|
|
|
|
|
|
# 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.
|
2015-11-20 10:10:08 -05:00
|
|
|
gitlab_rails['lfs_storage_path'] = "/mnt/storage/lfs-objects"
|
|
|
|
```
|
|
|
|
|
|
|
|
### Installations from source
|
|
|
|
|
|
|
|
In `config/gitlab.yml`:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
lfs:
|
|
|
|
enabled: false
|
|
|
|
storage_path: /mnt/storage/lfs-objects
|
|
|
|
```
|
|
|
|
|
2016-11-22 11:58:10 -05:00
|
|
|
## Storage statistics
|
|
|
|
|
|
|
|
You can see the total storage used for LFS objects on groups and projects
|
2017-02-06 09:46:58 -05:00
|
|
|
in the administration area, as well as through the [groups](../../api/groups.md)
|
|
|
|
and [projects APIs](../../api/projects.md).
|
2016-11-22 11:58:10 -05:00
|
|
|
|
2015-11-20 10:10:08 -05:00
|
|
|
## Known limitations
|
|
|
|
|
2016-03-03 11:21:32 -05:00
|
|
|
* Currently, storing GitLab Git LFS objects on a non-local storage (like S3 buckets)
|
|
|
|
is not supported
|
2017-05-05 02:57:47 -04:00
|
|
|
* Support for removing unreferenced LFS objects was added in 8.14 onwards.
|
2016-09-19 10:34:32 -04:00
|
|
|
* 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.
|
2016-11-22 11:58:10 -05:00
|
|
|
* The storage statistics currently count each LFS object multiple times for
|
|
|
|
every project linking to it
|