special remotes/webdavgit-annexhttp://git-annex.branchable.com/special_remotes/webdav/git-annexikiwiki2023-06-20T17:44:41Zgit-annex initremote failing for webdav servershttp://git-annex.branchable.com/special_remotes/webdav/comment_1_6b523eea78eae1d19fe2a9950ee33e3a/rfhbuk [myopenid.com]2013-11-27T22:47:37Z2012-12-01T10:18:04Z
<p>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</p>
<p>With livedrive.com:</p>
<pre><code>[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
</code></pre>
<p>With sd2dav.1und1.de:</p>
<pre><code>[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
</code></pre>
comment 2http://git-annex.branchable.com/special_remotes/webdav/comment_2_83fc4e7d9ba7a05c8500da659f561b8f/joeyh.name2013-11-27T22:47:37Z2012-12-01T18:34:05Z
<p>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?</p>
<p>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.</p>
comment 3http://git-annex.branchable.com/special_remotes/webdav/comment_3_239367ad639c61ecdf87a89f7ac53efe/joeyh.name2013-11-27T22:47:37Z2012-12-01T20:13:36Z
<p>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.</p>
<p>I don't know about sd2dav.1und1.de. The error looks like it doesn't support WebDAV file locking.</p>
comment 4http://git-annex.branchable.com/special_remotes/webdav/comment_4_ffa52f7776cdc8caa28667b5eadae123/joeyh.name2013-11-27T22:47:37Z2012-12-01T21:14:34Z
Good news, livedrive is supported now, by git-annex's master branch.
WebDAV without lockinghttp://git-annex.branchable.com/special_remotes/webdav/comment_5_5b8cbdb5e9a1b90d748a5074997e1cd5/peter-simons [myopenid.com]2013-11-27T22:47:37Z2013-01-16T12:44:16Z
<p>Hi Joey,</p>
<p>you are right, the 1-und-1.de implementation of WebDAV does not support locking.</p>
<p>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.</p>
comment 6http://git-annex.branchable.com/special_remotes/webdav/comment_6_d3be3e588c3a2abb2025ceb82c18b0ef/joeyh.name2013-11-27T22:47:37Z2013-01-17T18:23:27Z
<p>It seems it must advertise it supports the LOCK and UNLOCK http actions, but fails when they're used.</p>
<p>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. <a href="http://bugs.debian.org/698379">http://bugs.debian.org/698379</a></p>
SSL certificateshttp://git-annex.branchable.com/special_remotes/webdav/comment_7_6fa7e11331db5a943015bd5367eb3d73/Tobias2013-11-27T22:47:37Z2013-03-25T16:09:54Z
<p>Trying to use webdav leads in:</p>
<pre><code>git-annex: HandshakeFailed (Error_Protocol ("certificate rejected: not coping with anything else Start (Container Context 0)",True,CertificateUnknown))
</code></pre>
<p>How can I disable the SSL certificate check?</p>
comment 8http://git-annex.branchable.com/special_remotes/webdav/comment_8_2627b41f80c7511b27464e2040b128a8/joey2013-11-27T22:47:37Z2013-03-27T16:38:47Z
I don't think the checking of SSL certificates can currently be disabled.
Change Passwordhttp://git-annex.branchable.com/special_remotes/webdav/comment_9_b8f17efe524bb45a3e16705996df1265/Carl2014-05-02T12:30:58Z2014-05-02T12:30:58Z
I want to change the password that I use on a webdav service (Heartbleed mitigration). What do I need to do to in git annex to make it have access to the new password? Thanks in anvance.
re: Change Passwordhttp://git-annex.branchable.com/special_remotes/webdav/comment_10_2c087a132c2203ac20636800bf73dfa7/Yuval2014-05-04T19:09:55Z2014-05-04T19:09:55Z
I have Carl's problem as well. Changed box.com's password and now things are crazy.
comment 11http://git-annex.branchable.com/special_remotes/webdav/comment_11_cde4fccaf551ba1eab8235ebf6654316/joeyh.name2014-05-16T18:19:21Z2014-05-16T18:19:21Z
<p>You can change the webdav password by running:</p>
<p>WEBDAV_USERNAME=whatever WEBDAV_PASSWORD=newpassword git annex enableremote $remotename</p>
comment 12http://git-annex.branchable.com/special_remotes/webdav/comment_12_76423262fceeced32ab18fa38ed53bdb/Carl2014-05-17T20:47:00Z2014-05-17T20:47:00Z
<p>I tried it, but I do have som troubles. Changing password seemed to have worked. At least I do think it did say OK. Any further action generates the following response:</p>
<p>$ git annex fsck --from box.com3 Literatur/Science/Papers/Modén/2006.pdf</p>
<p>fsck Literatur/Science/Papers/Modén/2006.pdf (gpg) (checking box.com3...) (StatusCodeException (Status {statusCode = 401, statusMessage = "Unauthorized"}) [("Server","nginx"),("Date","Sat, 17 May 2014 19:04:51 GMT"),("Content-Type","application/xml; charset=utf-8"),("Content-Length","235"),("Connection","keep-alive"),("Vary","Host"),("WWW-Authenticate","Basic realm=\"dav.box.com\""),("X-Response-Body-Start","<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<d:error xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\">\n <s:exception>Sabre_DAV_Exception_NotAuthenticated</s:exception>\n <s:message>Username or password does not match</s:message>\n</d:error>\n")] (CJ {expose = []})) failed
git-annex: fsck: 1 failed</p>
<p>It seems it is not available to use the correct password. I tried to use initremote and create a new remote, and this works. In the end no data is lost, as three copies out of my four are still there. I will keep my old remote around for some time if there is any sort of errorfinding that can be done.</p>
Box.com and unknown CA?http://git-annex.branchable.com/special_remotes/webdav/comment_14_2390020fa7daac8a6d3e8b713bd3b8e7/Maarten2014-05-21T04:07:36Z2014-05-21T04:07:36Z
<p>When trying to enable box.com for jabber sharing, I get:</p>
<pre><code>WebDAV failed to write file: TlsException (HandshakeFailed (Error_Protocol ("certificate has unknown CA",True,UnknownCa))): user error
</code></pre>
<p>How can I debug this situation?</p>
comment 14http://git-annex.branchable.com/special_remotes/webdav/comment_14_45e3b7094d0611b2e082be352f74151a/olivier-mehani2014-11-05T22:57:21Z2014-11-05T22:57:21Z
<p>I have a similar problem to Maarten's, with some potential differences:
* The WebDAV server is actually an ownCloud 7 instance;
* The WebDAV server's SSL cert is issued by CAcert (whose root keys are otherwise installed on my system);
* The cetificate lists the WebDAV VHost's name as an Subject Alt Name rather than its Common Name.</p>
<pre><code>$ WEBDAV_USERNAME=shtrom WEBDAV_PASSWORD=correcthorsebatterystaple git annex initremote owncloud type=webdav url=https://owncloud/remote.php/webdav/annexdav chunk=10mb encryption=none
initremote owncloud (testing WebDAV server...)
git-annex: WebDAV failed to write file: TlsException (HandshakeFailed (Error_Protocol ("certificate rejected: [NameMismatch \"owncloud\"]",True,CertificateUnknown))): user error
</code></pre>
<p>failed
git-annex: initremote: 1 failed</p>
android clienthttp://git-annex.branchable.com/special_remotes/webdav/comment_15_d43673b8c8ed3534f31d026098ab673c/Karol2014-11-17T18:34:12Z2014-11-17T18:34:12Z
I am stuck at the same problem as Maarten, I cannot create box.com repository..
1und1 Online Speicherhttp://git-annex.branchable.com/special_remotes/webdav/comment_16_2a11dfc1fd159a6b9a25cde71ffec80b/Marco2016-10-19T03:42:42Z2016-10-19T03:42:42Z
<p>1und1 (a german ISP) will give you up to 1 TB of space hooked to your DSL account. The setup is a bit weird, so here a short way through that worked for me.</p>
<p>FIrst you need to create a service account to connect to your online storage. To create this account you need to go to the legacy control center. https://login.1und1.de/xml/config/ConfigMain;jsessionid=expired.TCpfix90a?__reuse=123
Go to "Online Speicher" and activate it. Next go to "Zugänge > Dienstepasswort" and ensure that one is set up. It seems that you have to wait some time until the password is useable.</p>
<p>The host you need to use is: https://sd2dav.1und1.de/ instead of the one that is mentioned in the manual.</p>
<p>Now you can set the remote up:</p>
<blockquote><p>WEBDAV_USERNAME='...' WEBDAV_PASSWORD='...' git annex initremote one type=webdav url=https://sd2dav.1und1.de/git-annex chunk=100mb encryption=shared</p></blockquote>
Unknown remote type webdavhttp://git-annex.branchable.com/special_remotes/webdav/comment_17_cfd2786a998af5034dc707f23aa81678/git2020-09-08T13:19:48Z2020-09-08T13:19:47Z
<p>When I try to use a WebDAV server as remote storage, "git annex initremote" stops with the error message</p>
<pre><code>git-annex: Unknown remote type webdav (pick from: git gcrypt p2p S3 bup directory rsync web bittorrent adb tahoe glacier ddar git-lfs hook external)
</code></pre>
<p>This looks like I need to explicitly add WebDAV support, but then this page says that it is built in.</p>
<p>I installed git-annex via Guix, so I checked the Guix package definition where I found the configuration flag "-WebDAV". I didn't find any documentation on this flag, nor configuration flags in general, so I don't know if this asks for including or excluding WebDAV support (or maybe even something completely different). So I compiled git-annex under Guix both with and without this flag. In both cases, the build log includes the lines</p>
<pre><code> BuildFlags.hs:42:2: error:
warning: #warning Building without WebDAV. [-Wcpp]
#warning Building without WebDAV.
^~~~~~~
|
42 | #warning Building without WebDAV.
| ^
</code></pre>
<p>There is no further explanation, so I have no idea why WebDAV was excluded. Any suggestions? I am completely unfamiliar with Haskell and its build system, so I don't even know how to explore this any further.</p>
Re: Unknown remote type webdavhttp://git-annex.branchable.com/special_remotes/webdav/comment_18_c0aff1c36b500ae67c6cb4b34292a54b/joey2020-09-08T16:51:38Z2020-09-08T16:26:41Z
<p>Yes, that flag disables building with webdav. And if the build environment
is limited in some way that the DAV dependency is not available, that flag
can be turned on automatically by the dependency resolver.</p>
<p>Probably guix needs to package the <a href="http://hackage.haskell.org/package/DAV">DAV library</a>
or add it to the dependencies of the package such that it's available
to build with.</p>
<p>Actually, I've gone ahead and removed the build flag in the next git-annex
version, so it will always be required to build.</p>
Re: Unknown remote type webdavhttp://git-annex.branchable.com/special_remotes/webdav/comment_19_8bf8d365c0a13f684ed9f9cb013396e7/git2020-09-09T09:48:15Z2020-09-09T09:48:15Z
Thanks a lot for those explanations! I managed to package DAV for Guix, and after rebuilding git-annex, webdav support seems to work as promised. I will clean up my packages and submit them for inclusion in Guix.
Re: Unknown remote type webdavhttp://git-annex.branchable.com/special_remotes/webdav/comment_20_a85a41709bbc0c7c138838ac94ba499f/git2020-09-09T10:19:21Z2020-09-09T10:19:21Z
Well... someone beat me to it! git-annex in Guix got WebDAV support eight hours ago!
comment 21http://git-annex.branchable.com/special_remotes/webdav/comment_21_e86cfc56014df46412f08b36bc019fb6/kyle2020-09-09T14:28:47Z2020-09-09T14:28:47Z
<blockquote><p>Well... someone beat me to it! git-annex in Guix got WebDAV support eight hours ago!</p></blockquote>
<p>That someone thanks you for working on the patches (and is sorry about the duplicate effort) <img src="http://git-annex.branchable.com/smileys/smile.png" alt=":)" /></p>
comment 22http://git-annex.branchable.com/special_remotes/webdav/comment_22_556386f26497f4075ab533e21e2077ce/git2020-09-10T17:12:57Z2020-09-10T17:12:57Z
<p>Well, better two packagers than zero <img src="http://git-annex.branchable.com/smileys/smile.png" alt=":-)" /></p>
<p>If I figured out what happened, it was my question here that prompted Joey to update git-annex to make WebDAV a requirement, which in turn prompted you to package the new dependencies in order to update the package in Guix. Complaint-driven packaging <img src="http://git-annex.branchable.com/smileys/smile4.png" alt=";-)" /></p>
<p>It wasn't a waste of time either, because at that occasion I found out that the Guix infrastructure for Haskell code is very nice. I hadn't done much more than import the packages from Hackage.</p>
read-only webdav accesshttp://git-annex.branchable.com/special_remotes/webdav/comment_23_b57fdd5322088e9b08dca7512c7e7793/kdm92023-06-20T10:22:57Z2023-06-20T10:22:57Z
<p>Hi Joey et al.,</p>
<p>Thanks yet again for a fantastic tool.</p>
<p>We are using it to distribute scientific data, via a webdav share backed by a customised owncloud deployment.</p>
<p>As this repository will be public, we want to have two special remotes: data-rw and data. The former is used by staff to upload data, and uses a share URL & password with list-read-write-upload-delete permission which works fine.</p>
<p>We also have a share link that only allows listing and reading content. If I try to initremote with the same settings as for the rw remote (but changing the username and password), then we get a failure during remote testing, as git-annex is unable to create a test file. I can get it to work if I temporary enable RW access for that share URL, but then an external user's <code>git annex enableremote</code> would fail when they go to initialise it later after I've reset the share link to RO.</p>
<p>I've tried with <code>git annex initremote ... readonly=true</code>, but that complains that readonly isn't a valid parameter for webdav. I also see in the source code that readonly is hard-coded to false for the webdav remote (I think -- my Haskell is very rusty).</p>
<p>Is there any chance that we can enable setting readonly=true for webdav, and disabling the write tests for a webdav remote, effectively turning it into a RO special remote <em>a la</em> http/ftp/etc?</p>
<p>I've tried using httpalso or web, but that's incompatible with the chunking we need to enable for Webdav.</p>
<p>Any other suggestions?</p>
<p>Thanks again and in advance,</p>
<p>KDM</p>
comment 24http://git-annex.branchable.com/special_remotes/webdav/comment_24_6c16a7c9abb257be4d046e27e11bacdf/joey2023-06-20T17:44:41Z2023-06-20T17:25:27Z
<p>httpalso now supports chunking. So I think there's no need to add readonly
support to webdav, probably. But if you disagree, I do think it would be
possible to add. Just probably not useful.. after all webdav minus writing
is little different than http. If you disagree, open a <a href="http://git-annex.branchable.com/todo/">todo</a>.</p>