Issue Pushing to Git Repo on Self Hosted Gitlab CE on AWS (18.5.1)

Problem to solve

Hi all, I am hosting Gitlab-CE on AWS as specified in this document:
The gitlab application server and gitaly server are hosted separately using the Linux Package (Omibus). I managed to get the gitlab app server up and running successfully. I have managed to create a repo but when trying to git push a small test file (393B) I get the error

! [remote rejected] main → main (pre-receive hook declined)

Below are the gitlab-ce versions I am using:
Server Info: Ubuntu 24.04 (EC2 x86)
Ruby: 3.2.8Gem Version 3.7.1
Redis: 7.2.10 (AWS Elasticache Redis OSS)
Sidekiq: 7.3.9
Gitlab: 18.5.1
DB: PostgreSQL 17.4 (AWS RDS)
Gitlab Shell: 14.45.3
Gitaly: 18.5.1
Git: 2.50.1

sudo gitlab-rake gitlab:check shows no errors. Redis has also been successfully configured. gitlab-ctl status shows all services running Ok.

Puma service is running and a quick curl check on 127.0.0.1:8080 shows status 200(OK). It is configured to listen to both TCP 8080 and socket.

Any help is much appreciated.

Hi,

Can you please check if your main branch is protected and if you have enough permissions to push to it directly?