Subversion: MKCOL 405 Method Not Allowed
I hope this helps some other poor person before they tear all their hair out.
This was driving me up the wall.
$ svn co -N https://repo/svn/fez
$ cd fez
$ mkdir -p qwacks/trunk qwacks/tag
$ cp -R ~/qwacks/* qwacks/trunk
$ svn add qwacks
A qwacks
A qwacks/trunk
AM qwacks/trunk/manage.py
..etc...
$ svn commit -m "initial import"
Adding qwacks
svn: Commit failed (details follow):
svn: MKCOL of '...': 405 Method Not Allowed (https://repo)
svn: Your commit message was left in a temporary file:
svn: '/Users/dan/tmp/fez/svn-commit.tmp'
$
What?! What does that mean:
svn: MKCOL of '...': 405 Method Not Allowed
Much Googling suggested that either a firewall was blocking DAV requests, or my Apache server was configured to reject them. The latter I considered a possibility, since I'd just spent the last hour fixing my config. Poring over the files yielded nothing.
Even worse, adding other files and folders to the repository worked.
Which - had I not had a beer first, I would have realised much sooner - meant there was something wrong with the 'qwacks' directory specifically.
The directory already existed in the Subversion repository - I hadn't realised that I'd already added it, and of course I did a non-recursive initial fetch, so I didn't spot it.
Ultimately, the error was therefore mine - trying to add a directory that already existed in source control. However, a more descriptive error message would have been nice!
I've disabled comments for now due to spam problems - I'll turn them back on when I've fixed it!
Comments
1 Raphael says...
It helped me. Thanks!
Posted at 2:48 p.m. on February 26, 2010
2 Robin says...
Thanks, it helped!
Posted at 3:49 p.m. on June 10, 2010