git-annex/ tips/ skydriveannex

# skydriveannex 0.2.1

Hook program for gitannex to use skydrive (previously Windows Live SkyDrive and Windows Live Folders) as backend

# Requirements:

    python2
    python-yaml

Credit for the Skydrive api interface goes to https://github.com/mk-fg/python-skydrive

# Install

Clone the git repository in your home folder.

    git clone git://github.com/TobiasTheViking/skydriveannex.git

This should make a ~/skydriveannex folder

# Setup

Make the file executable, and link it into PATH

    cd ~/skydriveannex; chmod +x git-annex-remote-skydrive; sudo ln -sf `pwd`/git-annex-remote-skydrive /usr/local/bin/git-annex-remote-skydrive

# Commands for gitannex:

    git annex initremote skydrive type=external externaltype=skydrive encryption=shared folder=gitannex

An oauth authentication link should now be launched in the default browser. Authenticate, and use the last url as OAUTH key.

    OAUTH='URL after last redirect' git annex initremote skydrive type=external externaltype=skydrive encryption=shared folder=gitannex
    git annex describe skydrive "the skydrive library"

QUESTION

Wondering about this:

    encryption=shared

I read what it means: http://git-annex.branchable.com/encryption/

But now I'm wondering how the repos which I set up via the assistant have been setup. when setting them up I only had the choice between "encrypt all files" and "disable encryption" so how can I check what settings my other repos are using?

Comment by https://www.google.com/accounts/o8/id?id=AItOawkAUMhKOSkh9JaBA6xst3XxQIIsDEq5Zd4 — Tue Jul 22 18:11:47 2025
Done! Success!

realized I need requests. to install I need pip.

    sudo port install py27-pip

    pip install requests

    login : 'EXCEPTION api.auth_get_token:ImportError('No module named six',)'

    pip install six

Finished! Seems to be working and I can see this repository in my assistant!

Comment by https://www.google.com/accounts/o8/id?id=AItOawkAUMhKOSkh9JaBA6xst3XxQIIsDEq5Zd4 — Tue Jul 22 18:11:47 2025
making some progress

Figured out how to solve that: which python /opt/local/bin/python shiny-2:git-annex ovi$ sudo ln -s `which python` /usr/bin/python2

The URL opened in my browser, I allowed access, waited for the redirect, copied the URL, hit the next problem:

    OAUTH='https://login.live.com/oauth20_desktop.srf?code=hidden_on_purpose' git annex initremote skydrive type=external externaltype=skydrive encryption=shared folder=git-annex

initremote skydrive (encryption setup) (shared cipher) 21:06:27 [skydriveannex-0.2.1] : 'Starting' 21:06:27 [skydriveannex-0.2.1] login : 'EXCEPTION api.auth_get_token:ImportError('No module named requests',)' git-annex: You need to set OAUTH environment variables and folder and encryption parameters when running initremote.

Comment by https://www.google.com/accounts/o8/id?id=AItOawkAUMhKOSkh9JaBA6xst3XxQIIsDEq5Zd4 — Tue Jul 22 18:11:47 2025
comment 6

tried it but no luck:

    git annex initremote skydrive type=external externaltype=skydrive encryption=shared folder=git-annex
    initremote skydrive (encryption setup) (shared cipher) env: python2: No such file or directory
    git-annex: external special remote protocol error, unexpectedly received "" (unable to parse command)

Comment by https://www.google.com/accounts/o8/id?id=AItOawkAUMhKOSkh9JaBA6xst3XxQIIsDEq5Zd4 — Tue Jul 22 18:11:47 2025
comment 5
You have to run git-annex init before you can use other git-annex commands. I think if you run git annex initremote now, it will work.
Comment by http://joeyh.name/ — Tue Jul 22 18:11:47 2025
comment 4
And no link was opened automatically
Comment by https://www.google.com/accounts/o8/id?id=AItOawkAUMhKOSkh9JaBA6xst3XxQIIsDEq5Zd4 — Tue Jul 22 18:11:47 2025
Hitting trouble

    shiny-2:skydriveannex ovi$ git annex initremote skydrive type=external externaltype=skydrive encryption=shared folder=git-annex
    git-annex: First run: git-annex init
    shiny-2:skydriveannex ovi$

Above wasn't mentioned in the tutorial so I tried it:

    shiny-2:skydriveannex ovi$ git-annex init
    init  ok
    (Recording state in git...)
    shiny-2:skydriveannex ovi$

What now? Never got asked about any OAUTH...

Comment by https://www.google.com/accounts/o8/id?id=AItOawkAUMhKOSkh9JaBA6xst3XxQIIsDEq5Zd4 — Tue Jul 22 18:11:47 2025
comment 2
The assistant will use any repositories you set up, no matter how you set them up.
Comment by http://joeyh.name/ — Tue Jul 22 18:11:47 2025
comment 11

shiny:skydriveannex ovi$ git annex initremote skydrive type=external externaltype=skydrive encryption=shared folder=gitannex initremote skydrive (encryption setup) (shared cipher) 21:14:20 [skydriveannex-0.2.1] : 'Starting' 21:14:20 [skydriveannex-0.2.1] login : 'EXCEPTION api.auth_get_token:AuthenticationError(u"Insufficient authentication data provided (missing keys: [u'code'])",)' osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/AeroFSFinderExtension.osax" cannot be used with the current OS because it has no OSAXHandlers entry in its Info.plist. git-annex: You need to set OAUTH environment variables and folder and encryption parameters when running initremote.

the folder gitannex was created on my onedrive but that is all.

Log files: [2015-10-03 21:12:43.322605] main: Syncing with onedrive 21:12:50 [skydriveannex-0.2.1] : 'Starting' 21:12:5

9 [ sYkoyud rnieveeda ntnoe xs-e0t. 2O.A1U]T Hl oegnivni r:o n'mEeXnCtE PvTaIrOiNa balpeis. aauntdh _fgoeltd_etro kaennd: PernoctroycpotliEornr opra(r4a0m0e,t e'r4s0 0f oCrl itehnet rEermrootre:. Bad Request')' [2015-10-03 21:13:07.435901] main: Syncing with onedrive

You need to set OAUTH environment variables and folder and encryption parameters for the remote. [2015-10-03 21:15:14.60821] main: Syncing with onedrive

You need to set OAUTH environment variables and folder and encryption parameters for the remote. [2015-10-03 21:15:57.926083] main: starting assistant version 5.20150929-g7010007 (scanning...) [2015-10-03 21:15:58.506776] Watcher: Performing startup scan (started...) gpg: Signature made Wed Sep 30 20:45:53 2015 CEST using DSA key ID 89C809CB gpg: /var/folders/m6/zkd11n111m38ff37zbtgq0lr0000gp/T/git-annex-gpg.tmp.0/trustdb.gpg: trustdb created gpg: Good signature from "git-annex distribution signing key (for Joey Hess) id@joeyh.name" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 4005 5C6A FD2D 526B 2961 E78F 5EE1 DBA7 89C8 09CB 21:16:01 [skydriveannex-0.2.1] : 'Starting' 21:16:

01 [Ysokuy dnreievde atnon esxe-t0 .O2A.U1T]H leongviinr o:n m'eEnXtC EvPaTrIiOaNb laepsi .aanudt hf_ogledte_rt oaknedn :ePnrcortyopctoiloEnr rpoarr(a4m0e0t,e r's4 0f0o rC ltiheen tr eEmrortoer.: Bad Request')' [2015-10-03 21:16:34.655604] main: Syncing with onedrive

You need to set OAUTH environment variables and folder and encryption parameters for the remote.

Comment by ovidiu — Tue Jul 22 18:11:47 2025
Syncing not working :-/

Error log says:

    git-annex-remote-skydrive is not installed in PATH (/Applications/git-annex.app/Contents/MacOS/bundle:/Applications/git-annex.app/Contents/MacOS/bundle:/Applications/git-annex.app/Contents/MacOS/bundle:/Applications/git-annex.app/Contents/MacOS/bundle:/Applications/git-annex.app/Contents/MacOS/bundle:/Applications/git-annex.app/Contents/MacOS/bundle:/Applications/git-annex.app/Contents/MacOS/bundle:/Applications/git-annex.app/Contents/MacOS/bundle:/usr/bin:/bin:/usr/sbin:/sbin)

BUT I did a symlink, I even did 2 to 2 different locations that are in my path:

    cd /Users/ovi/skydriveannex/
    ln -sf `pwd`/git-annex-remote-skydrive /usr/bin/git-annex-remote-skydrive
    ln -sf `pwd`/git-annex-remote-skydrive /opt/local/bin/git-annex-remote-skydrive

Comment by https://www.google.com/accounts/o8/id?id=AItOawkAUMhKOSkh9JaBA6xst3XxQIIsDEq5Zd4 — Tue Jul 22 18:11:47 2025
working for git-annex assistant?
Will following these steps lead to the Skydrive repo being visible and recognized by the assistant too?
Comment by https://www.google.com/accounts/o8/id?id=AItOawkAUMhKOSkh9JaBA6xst3XxQIIsDEq5Zd4 — Tue Jul 22 18:11:47 2025
Comments on this page are closed.