New branch push is incorrectly failing size file gitlab hook
Summary
When pushing a new branch, gitlab is rejecting the push, claiming I am pushing a file which is bigger than the specified limit. In fact, this file was already present in the repository, and the commit for this branch does not touch it.
Steps to reproduce
git checkout master
git pull
git checkout -b X
vi README.md
git add README.md
git commit -m message
git push --set-upstream origin X
What is the current bug behavior?
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 290 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: GitLab: File "deployment_tools/aws_environments/other/.terraform/plugins/linux_amd64/terraform-provider-aws_v1.5.0_x4" is larger than the allowed size of 1 MB
To git@git:innovations/spot.git
! [remote rejected] SPOT-0-test -> SPOT-0-test (pre-receive hook declined)
error: failed to push some refs to 'git@git:innovations/spot.git'
What is the expected correct behavior?
A normal push message
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.3.7p456 Gem Version: 2.6.14 Bundler Version:1.13.7 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.16.3 Sidekiq Version:5.0.5 Go Version: unknownGitLab information Version: 10.8.1-ee Revision: 921025f Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://git.genesiscare.com.au HTTP Clone URL: https://git.genesiscare.com.au/some-group/some-project.git SSH Clone URL: git@git.genesiscare.com.au:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 7.1.2 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
⟫ sudo gitlab-rake gitlab:check SANITIZE=true Checking GitLab Shell ...GitLab Shell version >= 7.1.2 ? ... OK (7.1.2) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 3/1 ... ok 3/2 ... ok 33/4 ... ok 2/5 ... ok 33/6 ... ok 34/7 ... ok 33/8 ... ok 33/9 ... ok 33/12 ... ok 32/13 ... ok 33/15 ... ok 33/16 ... repository is empty 35/17 ... ok 33/20 ... ok 33/21 ... ok 33/22 ... ok 33/23 ... ok 33/24 ... ok 33/25 ... ok 33/26 ... ok 33/27 ... ok 43/30 ... ok 33/33 ... ok 33/35 ... ok 3/37 ... ok 2/38 ... ok 4/39 ... repository is empty 33/40 ... ok 55/42 ... ok 2/43 ... ok 33/44 ... ok 55/46 ... ok 33/48 ... ok 3/49 ... ok 37/51 ... repository is empty 33/52 ... ok 55/55 ... ok 2/56 ... ok 33/57 ... ok 33/58 ... ok 61/59 ... ok 33/60 ... ok 33/61 ... ok 3/62 ... ok 71/64 ... ok 33/65 ... ok 33/66 ... ok 104/67 ... ok 33/69 ... repository is empty Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
Server: ldapmain not verifying SSL hostname of LDAPS server 'genesiscare.com.au:636' LDAP authentication... Success ...
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 3/1 ... yes 3/2 ... yes 33/4 ... yes 2/5 ... yes 33/6 ... yes 34/7 ... yes 33/8 ... yes 33/9 ... yes 33/12 ... yes 32/13 ... yes 33/15 ... yes 33/16 ... yes 35/17 ... yes 33/20 ... yes 33/21 ... yes 33/22 ... yes 33/23 ... yes 33/24 ... yes 33/25 ... yes 33/26 ... yes 33/27 ... yes 43/30 ... yes 33/33 ... yes 33/35 ... yes 3/37 ... yes 2/38 ... yes 4/39 ... yes 33/40 ... yes 55/42 ... yes 2/43 ... yes 33/44 ... yes 55/46 ... yes 33/48 ... yes 3/49 ... yes 37/51 ... yes 33/52 ... yes 55/55 ... yes 2/56 ... yes 33/57 ... yes 33/58 ... yes 61/59 ... yes 33/60 ... yes 33/61 ... yes 3/62 ... yes 71/64 ... yes 33/65 ... yes 33/66 ... yes 104/67 ... yes 33/69 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.7) Git version >= 2.9.5 ? ... yes (2.16.3) Git user has default SSH configuration? ... yes Active users: ... 45 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished