For using Owncloud and Nextcloud as a special remote, there are currently three choices:
Use git-annex's builtin webdav support.
Alternatively, rclone supports them so the rclone special remote can be used.
Alternatively, there is a dedicated special remote, https://github.com/TobiasTheViking/owncloudannex (Last updated 2014)
At this time it's not clear which is better, so if you find one works best, please comment below.
hi
I got the above message, and cannot sync to my owncloud. Here is the log file i had:
thanks
yan
Personally i've only seen that when the server ran out of space. But lets see what is going on.
Please run this command
git config annex.owncloud-hook '/usr/bin/python2 ~/owncloudannex/owncloudannex.py --dbglevel 1 --stderr'
And then replicate the error. It should give me some debug information to work with.
hi Tobias
Thanks your suggestion for list of my error log, here it is:
[2013-07-10 16:27:58 HKT] main: starting assistant version 4.20130627 (scanning...) [2013-07-10 16:27:58 HKT] Watcher: Performing startup scan (started...) [2013-07-10 16:28:14 HKT] Committer: Adding 2 files
add syncByRsync/sync2Servers.sh (checksum...) ok add syncByRsync/sync2Servers.sh (checksum...) [2013-07-10 16:28:14 HKT] Committer: Committing changes to git [2013-07-10 16:31:12 HKT] Watcher: add direct DSCN1810.JPG [2013-07-10 16:31:12 HKT] read: lsof ["-F0can","+d","/home/yan/annex_testing/.git/annex/tmp/"] [2013-07-10 16:31:12 HKT] Committer: Adding DSCN1810.JPG ok (Recording state in git...) (Recording state in git...) add DSCN1810.JPG 2013-07-10 16:31:12 HKT Watcher: add direct DSCN1810.JPG [2013-07-10 16:31:12 HKT] read: sha256sum ["/home/yan/annex_testing/.git/annex/tmp/DSCN181012023.JPG"]
DSCN1810.JPG changed while it was being added [2013-07-10 16:31:12 HKT] Committer: delaying commit of 1 changes [2013-07-10 16:31:13 HKT] read: lsof ["-F0can","+d","/home/yan/annex_testing/.git/annex/tmp/"] [2013-07-10 16:31:13 HKT] Committer: Adding 2 files failed add DSCN1810.JPG (checksum...) [2013-07-10 16:31:13 HKT] read: sha256sum ["/home/yan/annex_testing/.git/annex/tmp/DSCN181012023.JPG"] [2013-07-10 16:31:13 HKT] chat: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","hash-object","-t","blob","-w","--stdin","--no-filters"] ok add DSCN1810.JPG (checksum...) [2013-07-10 16:31:13 HKT] read: sha256sum ["/home/yan/annex_testing/.git/annex/tmp/DSCN181012024.JPG"] [2013-07-10 16:31:13 HKT] chat: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","hash-object","-t","blob","-w","--stdin","--no-filters"] [2013-07-10 16:31:13 HKT] Committer: committing 2 changes [2013-07-10 16:31:13 HKT] Committer: Committing changes to git [2013-07-10 16:31:13 HKT] feed: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","update-index","-z","--index-info"] [2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","commit","--allow-empty-message","--no-edit","-m","","--quiet","--no-verify"] [2013-07-10 16:31:13 HKT] Committer: queued Upload UUID "df02d32a-7e3a-4e12-a417-7f1d1a1cf1a6" DSCN1810.JPG Nothing : new file created [2013-07-10 16:31:13 HKT] chat: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","hash-object","-w","--stdin-paths","--no-filters"] [2013-07-10 16:31:13 HKT] feed: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","update-index","-z","--index-info"] [2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","show-ref","--hash","refs/heads/git-annex"] [2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","write-tree"] [2013-07-10 16:31:13 HKT] chat: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","commit-tree","a8337a989b58b29eee5fd2fa7a4c0b8ec45d5e59","-p","refs/heads/git-annex"] [2013-07-10 16:31:13 HKT] call: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","update-ref","refs/heads/git-annex","267bf35da4d9abe5ed7fe82ea5df8a8df2ddf940"] [2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","symbolic-ref","HEAD"] [2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","show-ref","refs/heads/master"] [2013-07-10 16:31:13 HKT] Transferrer: Transferring: Upload UUID "df02d32a-7e3a-4e12-a417-7f1d1a1cf1a6" DSCN1810.JPG Nothing [2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","show-ref","git-annex"] [2013-07-10 16:31:13 HKT] call: git-annex ["transferkeys","--readfd","46","--writefd","36"] [2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","show-ref","--hash","refs/heads/git-annex"] [2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","log","refs/heads/git-annex..267bf35da4d9abe5ed7fe82ea5df8a8df2ddf940","--oneline","-n1"] [2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","show-ref","git-annex"] [2013-07-10 16:31:13 HKT] read:[2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","ls-tree","-z","--","refs/heads/git-annex","uuid.log","remote.log","trust.log","group.log","preferred-content.log"] git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","show-ref","--hash","refs/heads/git-annex"] [2013-07-10 16:31:13 HKT] read: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","log","refs/heads/git-annex..267bf35da4d9abe5ed7fe82ea5df8a8df2ddf940","--oneline","-n1"] [2013-07-10 16:31:13 HKT] chat: git ["--git-dir=/home/yan/annex_testing/.git","--work-tree=/home/yan/annex_testing","cat-file","--batch"] (gpg) [2013-07-10 16:31:13 HKT] TransferWatcher: transfer starting: Upload UUID "df02d32a-7e3a-4e12-a417-7f1d1a1cf1a6" DSCN1810.JPG Nothing [2013-07-10 16:31:13 HKT] chat: gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--batch","--passphrase-fd","48","--symmetric","--force-mdc"] [2013-07-10 16:31:14 HKT] call: sh ["-c","/usr/bin/python2 /home/yan/annex/SocialBusiness/Resources/Infrastructure/Computer_Tools/Records/AsusU24/owncloudannex/owncloudannex.py --dbglevel 1 --stderr"]
16:31:16 [owncloudannex-0.1.1] : 'START' 16:31:16 [owncloudannex-0.1.1] main : 'ARGS: 'ANNEX_ACTION=store ANNEX_KEY=GPGHMACSHA1--0179fbbf559d5c25cf69b4e92025ff1f007d4f1f ANNEX_HASH_1=fp ANNEX_HASH_2=23 ANNEX_FILE=/home/yan/annex_testing/.git/annex/tmp/GPGHMACSHA1--0179fbbf559d5c25cf69b4e92025ff1f007d4f1f /home/yan/annex/SocialBusiness/Resources/Infrastructure/Computer_Tools/Records/AsusU24/owncloudannex/owncloudannex.py --dbglevel 1 --stderr'' 16:31:16 [owncloudannex-0.1.1] readFile : ''/home/yan/annex/SocialBusiness/Resources/Infrastructure/Computer_Tools/Records/AsusU24/owncloudannex/owncloudannex.conf' - 'r'' 16:31:16 [owncloudannex-0.1.1] readFile : 'Done' 16:31:16 [owncloudannex-0.1.1] login : '' 16:31:16 [owncloudannex-0.1.1] login : 'Using base: wingyan.no-ip.org - {'Authorization': 'Basic Y2h1bmd5YW41QGdtYWlsLmNvbTp5YW5fd2lraQ=='}' 16:31:16 [owncloudannex-0.1.1] login : 'res: <davlib.DAV instance at 0x12915f0>' 16:31:16 [owncloudannex-0.1.1] findInFolder : 'u'gitannex'() - '/'()' 16:31:17 [owncloudannex-0.1.1] findInFolder : 'propfind: /owncloud/remote.php/webdav - '<?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 <s:sabredav-version>1.7.6</s:sabredav-version>\n</d:error>\n'' 16:31:17 [owncloudannex-0.1.1] findInFolder : 'Failure' 16:31:17 [owncloudannex-0.1.1] createFolder : '/gitannex' 16:31:18 [owncloudannex-0.1.1] createFolder : 'Failure: 401 - '<?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 <s:sabredav-version>1.7.6</s:sabredav-version>\n</d:error>\n''
owncloud hook exited nonzero! [2013-07-10 16:31:18 HKT] TransferWatcher: transfer finishing: Transfer {transferDirection = Upload, transferUUID = UUID "df02d32a-7e3a-4e12-a417-7f1d1a1cf1a6", transferKey = Key {keyName = "911ba6148fbcbe4afe53772f1216b8204f403ed4ee06cb90c3c3ac25e56d9402.JPG", keyBackendName = "SHA256E", keySize = Just 1893431, keyMtime = Nothing}}
I figured out it is a Username or password does not match, and i saw the content of owncloudannex.conf as "uname": "myGmail@gmail.com", but i quickly saw my WebDAV login to owncloud as my user name, not gmail address, so i changed this "uname": "my_normal_user_name_not_gmail_acc" inside owncloudannex.conf. Finally, i got it work. So, i think, user name should not be a gmail address, should be owncloud login user name.
Another issue, i had a look into /WebDAV.../gitannex/, it is git repos. file, for my user opinion, it is better that it is a real file content that we can see the file(such as photos) by owncloud web client directly, rather that owncloud is a file server to keep git repos only.
Thanks
yan
Hm, an error like that it really should print without the need of debug information. I'll look into it.
And if you want the real file content, not encrypted, just change "shared" to "none" in the line:
git annex initremote owncloud type=hook hooktype=owncloud encryption=shared
I'm not sure if you can change this after you initialized the remote though. And also, the folder structure and filenames will be as you see them now on the owncloud. I'd need some more data from gitannex to make it show the real directory structure. But that doesn't seem feasible.
Why would you even want the data unencrypted on owncloud anyways? i mean on flickr, or googledocs, i kinda get it. but for owncloud?
hi Tobias
thanks your sharing, i am still in have a trial of git-annex, so i do not yet have real data on the server, so i just del. all and re-create both client and server repos in owncloud, i can got what you said, and see my photo.
Actually, i am studying git-annex. 1) It can syncs the data from my client computer to server. 2) i would like that other and anywhere computers through browser can view my server data which do not need to download all data into a new client. So my original goal is i can have a web to display the content of my files, and see owncloud have a nice web.
Regarding to GDoc, flickr, etc. they have space limitation, so i install owncloud as my own computer. I also see the http://git-annex.branchable.com/design/assistant/partial_content/, but it is not yet at roadmap.
thanks