While I was able to read/clone a git repository self-hosted with HTTPD and git-http-backend, I found that I could not push to it. Here’s how I fixed it.
The directions say this:
By default, only the
https://git-scm.com/docs/git-http-backend#_descriptionupload-pack
service is enabled, which serves git fetch-pack and git ls-remote clients, which are invoked from git fetch, git pull, and git clone. If the client is authenticated, thereceive-pack
service is enabled, which serves git send-pack clients, which is invoked from git push.
It goes on to say this:
These services can be enabled/disabled using the per-repository configuration file:
https://git-scm.com/docs/git-http-backend#_services
It turns out is was talking about the standard git configuration file, and not something web specific. Since I created a bare repository named gitserver.repo, this file is /var/lib/git/gitserver.repo/config. I added the following content, and was then able to push:
[http] receivepack = true |