3

I am currently trying to set up a Gitlab SaaS repository which works with Git LFS. I have tested uploading an LFS object on a free Gitlab repo and everything works fine. However, I am slightly concerned with the 10Gb limit on the repository, and since we are working with large files - I am curious if it's possible to configure a second repository for the LFS files specifically and point Gitlab (or any repo that supports this) to store the LFS objects there.

Essentially, I would like to store LFS files in one repository, and the rest of the code in another. That way the files can be monitored for size more easily while not impacting the limit on the 10Gb.

Does anyone know if this is possible, or supported on Gitlab or other repositories?

ballBreaker
  • 722
  • 1
  • 10
  • 29
  • 1
    LFS *already* stores the files somewhere else. What goes in the Git repository is simply a fancified URL. How you configure where that "somewhere else" is, I'm not sure, but that's what you need to find out. See [this question](https://stackoverflow.com/q/66307854/1256452). – torek May 18 '21 at 03:10
  • @torek I assume the question is about the remote repo and not what is downloaded to the local repo. – Dennis Nov 18 '22 at 16:33

1 Answers1

0

Yes, it possibile as explained in the official guide at https://docs.gitlab.com/ee/administration/lfs/ .

Here is the settings to accomplish that goal:

Omnibus installation

# /etc/gitlab/gitlab.rb

gitlab_rails['lfs_enabled'] = false
gitlab_rails['lfs_storage_path'] = "/mnt/storage/lfs-objects"

Installation from sources

# config/gitlab.yml

lfs:
    enabled: false
    storage_path: /mnt/storage/lfs-objects

By those settings you may, for example, mount on your server e remote storage, and configure it as LFS storage.

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74