Serve repositories via git-http-backend

We would like to serve the internal Gitlab repositories with an http server using git-http-backend (or similar). On this instance we will manage permissions for external collaborators without giving them access to the whole Gitlab infrastructure.

We set up git-http-backend to run with the git user, and we have now access to the /var/opt/gitlab/git-data/repositories/ directory.

We successfully manage to clone a repository, but we are not allowed to push new commits, because of the pre-receive hook:

$ git push
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 338 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: No user or key was provided.
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to ''

Is there a way to go around it without breaking the Gitlab hooks (which I believe are crucial when operating via Gitlab)?
And more in general, is there a way to serve the internal Gitlab repositories with other tools? (if not with http, what about gitolite?)