Search code examples
githttphttpspush

Cannot push Git to remote repository with http/https


I have a Git repository in a directory served by apache on a server. I have configured WebDAV and it seems to be running correctly. Litmus returns 100% success.

I can clone my repository from a remote host, but when trying to push over http or https, I get the following error:

error: Cannot access URL https://git.example.com/repo/, return code 22 fatal: git-http-push failed

Any idea?


Solution

  • It is highly suggested NOT to use WebDAV if possible. If you must use HTTP/HTTPS then usage of the git-http-backend CGI script is recommended over WebDAV.