I have looked at this and this which both describe similar problems but don't offer solutions to my problem. However, Gitolite only started doing this last night and I'm not sure what caused it. Here are the errors I'm getting:
git@server:/path/to/cloned/repo/$ git push
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 374 bytes, done.
Total 4 (delta 2), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
remote: ENV GL_RC not set
remote: BEGIN failed--compilation aborted at hooks/update line 20.
remote: error: hook declined to update refs/heads/master
To /home/git/repositories/git-repo-name.git/
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '/home/git/repositories/git-repo-name.git/'
Now what is strange is that Gitolite only started complaining now. It has worked fine for the last week or so.