0

I'm building a GitLab self-hosted instance for academical purpose, using GitLab CE, and I want to limit the space which stores each user.

I want to set a maximum size to store in a repository, which locks the uploads in case that user exceed the repository storage limit.

As this way, when this limit is get, the user only can remove files (or the content of these), but never upload new files or add new content

Are there any way to do this?

2
  • What have you tried so far? Have you done any research to see if this product supports that function? – music2myear Jan 13 '20 at 4:52
  • I tried to limit the repository stotage, but this function only exists in GitLab EE – AlmuHS Jan 13 '20 at 9:34
1

Sorry to say, this is not available in the Core (CE) version as you've noted. Repository limit is only available with a paid license.

Though you can see how it was implemented.

1

Finally, I solved It using a pre-receive hook in server-side. The hook raise a bash script, which check the repository folder size using du -s and return 1 if this size exceeds the sizelimit

https://gitlab.com/AlmuHS/gitlab_repo_limits

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.