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
But they seem to be working with Apache and most of the solutions are by editing Apache's config file.
To push changes from the current branch press Ctrl+Shift+K or choose Git | Push from the main menu. To push changes from any local branch that has a remote, select this branch in the Branches popup and choose Push from the list of actions.
Git supports two HTTP based transfer protocols. A "dumb" protocol which requires only a standard HTTP server on the server end of the connection, and a "smart" protocol which requires a Git aware CGI (or server module).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With