Fix push but no ontologies2

This fixes pushes not being processed completely (#1008). I also tested that the post-receive hook is not run when the pushing user has no write permissions on the repository.