threads / discuss / 20596

http-push sends MKCOL command to create remote directory MKCOL http://user@server:80/url/.git/refs/ that already exists

Subject: http-push sends MKCOL command to create remote directory MKCOL http://user@server:80/url/.git/refs/ that already exists

## tl;dr

2 messages between Aug 14, 2009 and Aug 15, 2009.

replies: 1people: 2as markdown or json

willievu· Aug 14, 2009, 15:42 UTC · lore
Steps will reproduce the problem:
1. create a bare & shared repository locally and copy to remote server
2. create a local repository. add and commit some files
3. git push to the remote server
$ git push --verbose --thin upload HEAD
Pushing to http://user@server/url/.git/
Password:
Fetching remote heads...
  refs/
  refs/heads/
  refs/tags/
updating 'refs/heads/master' using 'HEAD'
  from 0000000000000000000000000000000000000000
  to   0120f45ebfd90501868e990bfbb9f50fb0a8ebae

<<<<< Here, a MKCOL http://user@server:80/url/.git/refs/ request is sent. The WebDAV server returns a HTTP 500 Internal Server Error. Then, the following message continues:

Unable to create branch path http://user@server/url/.git/refs/ Unable to lock remote branch refs/heads/master error: failed to push some refs to 'http://user@server/url/.git/'

This is the server:
Server: Oracle9iAS/9.0.2.3.0 Oracle HTTP Server (Unix) mod_plsql/9.0.2.6.0b 
DAV/1.0.3.2.4-0119 (OraDAV enabled) mod_osso/9.0.2.0.0 mod_ossl/9.0.2.0.0 
mod_fastcgi/2.2.12 mod_perl/1.26 mod_oc4j/3.0

Is MKCOL expected even for existing directory in the remote repository? Is this a WebDAV server problem that 500 is returned?

-- 
View this message in context: http://n2.nabble.com/http-push-sends-MKCOL-command-to-create-remote-directory-MKCOL-http%3A--user%40server%3A80-url-.git-refs--that-already-exists-tp3445796p3445796.html
Sent from the git mailing list archive at Nabble.com.
Tay Ray Chuan· Aug 15, 2009, 01:28 UTC · re: willievu · lore

Re: http-push sends MKCOL command to create remote directory MKCOL http://user@server:80/url/.git/refs/ that already exists

Hi,
On Fri, Aug 14, 2009 at 11:42 PM, willievu<willievu@dev.java.net> wrote:
> Is MKCOL expected even for existing directory in the remote repository?  Is
> this a WebDAV server problem that 500 is returned?

Yes, you should expect MKCOLs to be done on directories that already exist. On my Apache server with WebDAV, when a MKCOL is done on a directory that already exists, it returns 405. Reading the WebDAV specs (http://www.webdav.org/specs/rfc4918.html#rfc.section.9.3.1):

  405 (Method Not Allowed) - MKCOL can only be executed on an unmapped URL.
So this behaviour is accounted for in the spec itself, and git handles this too.

What I think is that your server isn't implementing WebDAV right, or that you have some scripts/mods over the git repository you're serving that are failing leading to the 500 error.

-- 
Cheers,
Ray Chuan

← back to recent threads