Pushing to a git repository hosted locally over HTTP
git
Solution
When using a SimpleHTTPServer, you are using the so called dumb http protocol. It is called dumb because it has no knowledge about git at all. Because of that, pushing to such a server does not work, because the http server has no clue what to do with the request git is making.
Git has a cgi script, called git-http-backend, which is made to allow for pushing over http by using the smart http protocol.
I have no experience with this, but you could look at pythons CGIHTTPServer which you could direct to git-http-backend.
But the easiest way is to use apache.
Problem
I wish to push to a git repository hosted on `http://localhost:8000/tehCode.git` servered using the `python -m "SimpleHTTPServer"` command. I receive an error ``` error: Cannot access URL http://localhost:8000/tehCode.git/, return code 22 fatal: git-http-push failed ``` I can clone this repository just fine, but I can't push to it. How can I do this assuming I want to still use the Python SimpleHTTPServer ? I've already looked at - Cannot push Git to remote repository with http/https - https://superuser.com/questions/473177/git-push-fatal-failed But they seem to be working with Apache and most of the solutions are by editing Apache's config file.