Setting up git over webdav with anonymous access for read-only and password protected commit rights - blerb git repo available 2

Posted by Tim Connor Mon, 03 Dec 2007 05:11:00 GMT

Some useful info on the DH wiki for git and on’s guide to setting up git over http. The latter is especially helpful for debugging suggestions (like using curl to check your .netrc access permission). Using the info in these guides:

  • Create a repo, or use an existing one
  • Enable WebDav access on a DH directory, using their panel. Set-up the username password for the committers, and disable the password protection box for read-only anonymous access (might be easier to keep it on until you have everything set-up right)
  • Create a .netrc with the auth info for this webdav
  • Test your access using the curl command in the guide (you may find it useful to have password protection enabled at this point,).
  • Connect to the webdav share using the username and password.
  • Copy over the .git folder contents into the root of the webdav share (this is key, because DH’s anonymous access won’t show . files)
  • cd into the webdav share from your local machine and run “git-update-server-info”
  • profit

You should now have access to http://yourserver/gitfoldername and http://gituser@yourserver/gitfoldername. For example: you can “git clone” for read-only access to the blerb repo. Now, if I can only get gitweb working despite the limited access control imposed by DH webDAV.

Update: Changes the url for blerb to still work right after I changed it around while playing with gitweb. Also, you should use git:// if you actually want the real blerb repository.


Leave a comment

  1. Avatar
    Phil about 14 hours later:

    I tried to get this going a couple of weeks ago. Wasted a couple hours on it before switching to… Looks like you have a bit more patience than I.

  2. Avatar
    Tim Connor about 14 hours later:

    Nah, Phil – you just knew existed, whereas I didn’t. ;)