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"
Will following these steps lead to the Skydrive repo being visible and recognized by the assistant too?
The assistant will use any repositories you set up, no matter how you set them up.
Comment by http://joeyh.name/ Fri May 16 12:26:50 2014
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...

And no link was opened automatically
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/ Fri May 16 15:03:34 2014

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)

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.

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!

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?

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
Comments on this page are closed.