I've implemented a PHP wrapper for git http backend which works well. I've done this to give me advanced control of who has access to repositories on my server. You can see the implementation here <http://stackoverflow.com/a/37242591>. I can pull from the server okay and all works well. However, I cannot push. When I read my trace code to see where it fails, I see that the last request is a PROPFIND request. The URL for this request does not have any of the usual 'info/refs' etc. that one usually gets on git calls.
During reading of the documentation and reviewing how git-http-backend should be implemented, I can see that it should not be making a WebDAV request. I have also come across posts where people implementing http-backend the 'normal' way have also had this problem, e.g. this guy <http://serverfault.com/questions/390864/git-push-over-http-using-git-http-backend-and-apache-is-not-working> . So the question is, why is WebDAV being used on push? Trace code from the push: [2016-05-25 09:49:35] ========================== [2016-05-25 09:49:35] REQUEST: { "q": "p\/git-backend\/run\/1\/info\/refs", "service": "git-receive-pack" } [2016-05-25 09:49:35] SERVER: { "REDIRECT_STATUS": "200", "HTTP_HOST": "...", "HTTP_USER_AGENT": "git\/2.7.4", "HTTP_ACCEPT": "*\/*", "HTTP_ACCEPT_ENCODING": "gzip", "HTTP_ACCEPT_LANGUAGE": "en-GB, en;q=0.9, *;q=0.8", "HTTP_PRAGMA": "no-cache", "PATH": "...", "SERVER_SIGNATURE": "<address>Apache\/2.4.18 (Ubuntu) Server at ... Port 80<\/address>\n", "SERVER_SOFTWARE": "Apache\/2.4.18 (Ubuntu)", "SERVER_NAME": "...", "SERVER_ADDR": "...", "SERVER_PORT": "80", "REMOTE_ADDR": "...", "DOCUMENT_ROOT": "...", "REQUEST_SCHEME": "http", "CONTEXT_PREFIX": "", "CONTEXT_DOCUMENT_ROOT": "...", "SERVER_ADMIN": "...", "SCRIPT_FILENAME": "...", "REMOTE_PORT": "49630", "REDIRECT_URL": "\/p\/git-backend\/run\/1\/info\/refs", "REDIRECT_QUERY_STRING": "q=p\/git-backend\/run\/1\/info\/refs&service=git-receive-pack", "GATEWAY_INTERFACE": "CGI\/1.1", "SERVER_PROTOCOL": "HTTP\/1.1", "REQUEST_METHOD": "GET", "QUERY_STRING": "q=p\/git-backend\/run\/1\/info\/refs&service=git-receive-pack", "REQUEST_URI": "\/p\/git-backend\/run\/1\/info\/refs?service=git-receive-pack", "SCRIPT_NAME": "\/index.php", "PHP_SELF": "\/index.php", "REQUEST_TIME_FLOAT": 1464162575.091, "REQUEST_TIME": 1464162575 } [2016-05-25 09:49:35] Path: /core.git/info/refs?service=git-receive-pack [2016-05-25 09:49:35] Cleaned, result only: [2016-05-25 09:49:35] f4648182f5f8eee082c37a83a0072cfc4210e5c5 refs/heads/master 8c4efcd77809bc9b94a59cf94653add8007c6b7d refs/heads/zztest [2016-05-25 09:49:35] ========================== [2016-05-25 09:49:35] REQUEST: { "q": "p\/git-backend\/run\/1\/HEAD" } [2016-05-25 09:49:35] SERVER: { "REDIRECT_STATUS": "200", "HTTP_HOST": "...", "HTTP_USER_AGENT": "git\/2.7.4", "HTTP_ACCEPT": "*\/*", "HTTP_ACCEPT_ENCODING": "gzip", "HTTP_ACCEPT_LANGUAGE": "en-GB, en;q=0.9, *;q=0.8", "HTTP_PRAGMA": "no-cache", "PATH": "...", "SERVER_SIGNATURE": "<address>Apache\/2.4.18 (Ubuntu) Server at ... Port 80<\/address>\n", "SERVER_SOFTWARE": "Apache\/2.4.18 (Ubuntu)", "SERVER_NAME": "...", "SERVER_ADDR": "...", "SERVER_PORT": "80", "REMOTE_ADDR": "...", "DOCUMENT_ROOT": "...", "REQUEST_SCHEME": "http", "CONTEXT_PREFIX": "", "CONTEXT_DOCUMENT_ROOT": "...", "SERVER_ADMIN": "...", "SCRIPT_FILENAME": "...", "REMOTE_PORT": "49630", "REDIRECT_URL": "\/p\/git-backend\/run\/1\/HEAD", "REDIRECT_QUERY_STRING": "q=p\/git-backend\/run\/1\/HEAD", "GATEWAY_INTERFACE": "CGI\/1.1", "SERVER_PROTOCOL": "HTTP\/1.1", "REQUEST_METHOD": "GET", "QUERY_STRING": "q=p\/git-backend\/run\/1\/HEAD", "REQUEST_URI": "\/p\/git-backend\/run\/1\/HEAD", "SCRIPT_NAME": "\/index.php", "PHP_SELF": "\/index.php", "REQUEST_TIME_FLOAT": 1464162575.266, "REQUEST_TIME": 1464162575 } [2016-05-25 09:49:35] Path: /core.git/HEAD [2016-05-25 09:49:35] Cleaned, result only: [2016-05-25 09:49:35] ref: refs/heads/master [2016-05-25 09:49:35] ========================== [2016-05-25 09:49:35] REQUEST: { "q": "p\/git-backend\/run\/1\/" } [2016-05-25 09:49:35] SERVER: { "REDIRECT_STATUS": "200", "HTTP_HOST": "...", "HTTP_USER_AGENT": "git\/2.7.4", "HTTP_ACCEPT": "*\/*", "HTTP_DEPTH": "0", "CONTENT_TYPE": "text\/xml", "CONTENT_LENGTH": "167", "HTTP_EXPECT": "100-continue", "PATH": "...", "SERVER_SIGNATURE": "<address>Apache\/2.4.18 (Ubuntu) Server at ... Port 80<\/address>\n", "SERVER_SOFTWARE": "Apache\/2.4.18 (Ubuntu)", "SERVER_NAME": "...", "SERVER_ADDR": "...", "SERVER_PORT": "80", "REMOTE_ADDR": "...", "DOCUMENT_ROOT": "...", "REQUEST_SCHEME": "http", "CONTEXT_PREFIX": "", "CONTEXT_DOCUMENT_ROOT": "...", "SERVER_ADMIN": "...", "SCRIPT_FILENAME": "...", "REMOTE_PORT": "49632", "REDIRECT_URL": "\/p\/git-backend\/run\/1\/", "REDIRECT_QUERY_STRING": "q=p\/git-backend\/run\/1\/", "GATEWAY_INTERFACE": "CGI\/1.1", "SERVER_PROTOCOL": "HTTP\/1.1", "REQUEST_METHOD": "PROPFIND", "QUERY_STRING": "q=p\/git-backend\/run\/1\/", "REQUEST_URI": "\/p\/git-backend\/run\/1\/", "SCRIPT_NAME": "\/index.php", "PHP_SELF": "\/index.php", "REQUEST_TIME_FLOAT": 1464162575.711, "REQUEST_TIME": 1464162575 } [2016-05-25 09:49:35] Path: /core.git/ [2016-05-25 09:49:35] <?xml version="1.0" encoding="utf-8" ?> <D:propfind xmlns:D="DAV:"> <D:prop xmlns:R="http://.../p/git-backend/run/1/"> <D:supportedlock/> </D:prop> </D:propfind> [2016-05-25 09:49:35] Exception: Request not supported: '/path/to/git/repo.git/' -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.