Account and limit settings

Repository size limit

Repositories within your GitLab instance can grow quickly, especially if you are using LFS. Their size can grow exponentially, rapidly consuming available storage.

To avoid this from happening, you can set a hard limit for your repositories’ size. This limit can be set globally, per group, or per project, with per project limits taking the highest priority.

There are numerous use cases where you might set up a limit for repository size. For instance, consider the following workflow:

  1. Your team develops apps which require large files to be stored in the application repository.
  2. Although you have enabled Git LFS to your project, your storage has grown significantly.
  3. Before you exceed available storage, you set up a limit of 10 GB per repository.

How it works

Only a GitLab administrator can set those limits. Setting the limit to 0 means there are no restrictions.

These settings can be found within:

  • Each project’s settings.
  • A group’s settings.
  • The Size limit per repository (MB) field in the Account and limit section of a GitLab instance’s settings by navigating to either:
    • Admin Area > Settings > General.
    • The path /admin/application_settings.

The first push of a new project, including LFS objects, will be checked for size and will be rejected if the sum of their sizes exceeds the maximum allowed repository size.

For details on manually purging files, see reducing the repository size using Git.

Note: For, the repository size limit is 10 GB.