Cannot push to new repository

Recently any new repository that is made cannot be pushed to, despite the branch not being protected:

    remote: GitLab: API is not accessible
    To git@---:Jake-E/---.git
     ! [remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to 'git@---:Jake-E/---.git'

Repository has no configured integrations or webhooks.

After checking logs, it seems that I’m getting a 500 error on /api/:version/internal/allowed
The exception message is: 13:HasLocalBranches: cmd wait: exit status 128

This is a self-hosted gitlab, running on 13.1.1-ee (a604fffd4ba)

Have run gitlab-rake gitlab:check --trace with no issues (other than not using hashed storage yet).
Have also run gitlab-rake gitlab:git:fsck with no reported errors on any repositories.

Have been googling for this HasLocalBranches issue, but any issues I’ve come across don’t seem to have any useful information on fixing the issue.

Any advice is highly appreciated.