`Your push has been rejected, because this repository has exceeded its size limit of 0 Bytes by XYZ MB` appears on unrelated repositories
Summary
- The
Your push has been rejected, because this repository has exceeded its size limit of 0 Bytes by XYZ MB.
message appears in unrelated repositories on anygit push
, when there is a repository within the group that has exceeded the 10 GB repository size limit on gitlab.com
Steps to reproduce
Context: We will create a 11GB repository on a self-managed instance (has no limit on repository size), and then import it into gitlab.com (Has a 10GB limit on repository size).
- Create a public project on a self-managed instance. Let's call it
BigProject
. - For this project, perform the following on the git CLI.
git clone https://<url>/<namespace>/BigProject
dd if=/dev/urandom of=file1.file bs=1024 count=1024000
dd if=/dev/urandom of=file2.file bs=1024 count=1024000
dd if=/dev/urandom of=file3.file bs=1024 count=1024000
dd if=/dev/urandom of=file4.file bs=1024 count=1024000
dd if=/dev/urandom of=file5.file bs=1024 count=1024000
dd if=/dev/urandom of=file6.file bs=1024 count=1024000
dd if=/dev/urandom of=file7.file bs=1024 count=1024000
dd if=/dev/urandom of=file8.file bs=1024 count=1024000
dd if=/dev/urandom of=file9.file bs=1024 count=1024000
dd if=/dev/urandom of=file1o.file bs=1024 count=1024000
dd if=/dev/urandom of=file11.file bs=1024 count=1024000
git add .
git commit -m 'Add big files'
git push
- Create a new project on gitlab.com, and import the above project. Let's say we import it into the
gitlab-silver/kenneth-silver
subgroup. - Create a new project under the same subgroup. For example,
gitlab-silver/kenneth-silver/zd402915-2
- For this newly created project, perform the following on the git CLI.
git clone <project two>
echo "Hello World" > file.txt
git add file.txt
git commit -m "Add file.txt"
git push
- We see this result in the git CLI output:
$ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 231 bytes | 231.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote:
remote: ========================================================================
remote:
remote: Your push has been rejected, because this repository has exceeded
remote: its size limit of 0 Bytes by 760 MB. Please contact your GitLab
remote: administrator for more information.
remote:
remote: ========================================================================
remote:
To gitlab.com:/gitlab-silver/kenneth-silver/zd402915-2
- But observe the push succeeded into the project anyway.
Example Project
- Imported project that is >10GB: https://gitlab.com/gitlab-silver/kenneth-silver/zd402915-bigproject
- "Unrelated project" in the same group: https://gitlab.com/gitlab-silver/kenneth-silver/zd402915-2
As this group is used by many GitLab Team Members for testing, I may remove the bigproject
project after a week. Note to any GitLab team members: if it does cause any issues, go ahead and delete the project
What is the current bug behavior?
The Your push has been rejected...
error message appears on projects that are not exceeding the repository size limit.
What is the expected correct behavior?
The Your push has been rejected...
error message only appears on projects that have exceeded the repository size limit.
Output of checks
- This bug happens on GitLab.com. Version: GitLab Enterprise Edition 16.0.0-pre 35ea0cd1
- I was not able to reproduce the issue on GitLab Enterprise Edition 15.10.3-ee, when I added a 10GB repository limit in the admin settings, after creating an 11GB repository in a project.
Edited by Kenneth Chu