304 North Cardinal St.
Dorchester Center, MA 02124
This article will discuss ways of fixing the GitLab error: GitLab pre-receive hook declined.
While working on a new Gitlab repository, one of our developers received the GitLab push error:
! [remote rejected] main -> main (pre-receive hook declined)
This issue can be because of one of two reasons.
The whole repository or a file inside the repository exceeds the size limit. You can verify this by reading the error message in detail, it should mention this clearly:
GitLab: You are attempting to check in one or more blobs which exceed the 100.0MiB limit:
The second reason is that the branch is protected and/or the dev does not have sufficient permissions.
Gitlab > Repo > Settings > Repository and scroll down to
You a few options here.