This special remote type stores file contents in a WebDAV server.

configuration

The environment variables WEBDAV_USERNAME and WEBDAV_PASSWORD are used to supply login credentials. You need to set these only when running git annex initremote, as they will be cached in a file only you can read inside the local git repository.

A number of parameters can be passed to git annex initremote to configure the webdav remote.

  • encryption - Required. Either "none" to disable encryption (not recommended), or a value that can be looked up (using gpg -k) to find a gpg encryption key that will be given access to the remote, or "shared" which allows every clone of the repository to access the encrypted data (use with caution).

    Note that additional gpg keys can be given access to a remote by running enableremote with the new key id. See encryption.

  • embedcreds - Optional. Set to "yes" embed the login credentials inside the git repository, which allows other clones to also access them. This is the default when gpg encryption is enabled; the credentials are stored encrypted and only those with the repository's keys can access them.

    It is not the default when using shared encryption, or no encryption. Think carefully about who can access your repository before using embedcreds without gpg encryption.

  • url - Required. The URL to the WebDAV directory where files will be stored. This can be a subdirectory of a larger WebDAV repository, and will be created as needed. Use of a https URL is strongly encouraged, since HTTP basic authentication is used.

  • chunksize - Avoid storing files larger than the specified size in WebDAV. For use when the WebDAV server has file size limitations. The default is to never chunk files.
    The value can use specified using any commonly used units. Example: chunksize=75 megabytes
    Note that enabling chunking on an existing remote with non-chunked files is not recommended.

Setup example:

# WEBDAV_USERNAME=joey@kitenet.net WEBDAV_PASSWORD=xxxxxxx git annex initremote box.com type=webdav url=https://www.box.com/dav/git-annex chunksize=75mb encryption=joey@kitenet.net

Unfortunately, trying to set up the following webdav servers fail. Some of the terminal output of git-annex --debug initremote ... is below, but it may not really helpful. Can I help any further, can a webdav remote be set up in a different way? (The box.com webdav initremote worked fine.) Cheers

With livedrive.com:

[2012-12-01 10:15:12 GMT] chat: gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--encrypt","--no-encrypt-to","--no-default-recipient","--recipient","xxxxxxxxxxxxxx"]
(encryption setup with gpg key xxxxxxxxxxxxxx) (testing WebDAV server...)
git-annex: "Bad Request": user error
failed
git-annex: initremote: 1 failed

With sd2dav.1und1.de:

[2012-12-01 10:13:10 GMT] chat: gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--encrypt","--no-encrypt-to","--no-default-recipient","--recipient","xxxxxxxxxxxxxx"]
(encryption setup with gpg key xxxxxxxxxxxxxx) (testing WebDAV server...)
git-annex: "Locked": user error
failed
git-annex: initremote: 1 failed
Comment by rfhbuk [myopenid.com] Sat Dec 1 06:18:04 2012

I tried signing up for livedrive, but I cannot log into it with WebDav at all. Do they require a Pro account to use WebDav?

When it's "testing webdav server", it tries to make a collection (a subdirectory), and uploads a file to it, and sets the file's properties, and deletes the file. One of these actions must be failing, perhaps because the webdav server implementation does not support it. Or perhaps because the webdav client library is doing something wrong. I've instrumented the test, so it'll say which one.

Comment by joeyh.name Sat Dec 1 14:34:05 2012

I've identified the problem keeping it working with livedrive. Once a patch I've written is applied to the Haskell DAV library, I'll be able to update git-annex to support it.

I don't know about sd2dav.1und1.de. The error looks like it doesn't support WebDAV file locking.

Comment by joeyh.name Sat Dec 1 16:13:36 2012
Good news, livedrive is supported now, by git-annex's master branch.
Comment by joeyh.name Sat Dec 1 17:14:34 2012

Hi Joey,

you are right, the 1-und-1.de implementation of WebDAV does not support locking.

Do you think there is a way to make that service work with git-annex anyhow -- say, by allowing the user to disable file-locking? I've worked around the problem with 1-und-1.de by using fuse+davfs2 to mount the storage in my file system and access it through the directory backend, but FUSE is dead slow, unfortunately, and this solution really sucks.

Comment by peter-simons [myopenid.com] Wed Jan 16 08:44:16 2013

It seems it must advertise it supports the LOCK and UNLOCK http actions, but fails when they're used.

The DAV library I am using always locks if it seems the server supports it. So this will need changes to that library. I've filed a bug requesting the changes. http://bugs.debian.org/698379

Comment by joeyh.name Thu Jan 17 14:23:27 2013

Trying to use webdav leads in:

git-annex: HandshakeFailed (Error_Protocol ("certificate rejected: not coping with anything else Start (Container Context 0)",True,CertificateUnknown))

How can I disable the SSL certificate check?

Comment by Tobias Mon Mar 25 12:09:54 2013
I don't think the checking of SSL certificates can currently be disabled.
Comment by joey Wed Mar 27 12:38:47 2013
Comments on this page are closed.