The software documented below is not being maintained.
Instead, use https://github.com/Lykos153/git-annex-remote-googledrive
googledriveannex 0.2.0
Hook program for gitannex to use Google Drive as backend
Requirements:
python2
python-httplib2
Credit for the googledrive api interface goes to google
Install
Clone the git repository in your home folder.
git clone git://github.com/TobiasTheViking/googledriveannex.git
This should make a ~/googledriveannex folder
Setup
Make the file executable, and link it into PATH
cd ~/googledriveannex; chmod +x git-annex-remote-googledrive; sudo ln -sf `pwd`/git-annex-remote-googledrive /usr/local/bin/git-annex-remote-googledrive
Commands for gitannex:
git annex initremote googledrive type=external externaltype=googledrive encryption=shared folder=gitannex
An oauth authentication link should now be launched in the default browser. Authenticate and you will be proved with a code.
OAUTH='authentication code' git annex initremote googledrive type=external externaltype=googledrive encryption=shared folder=gitannex
git annex describe googledrive "the googledrive library"
the referenced custom remote project is pretty much dead, PRs are hanging without merge, issues lists growing (https://github.com/TobiasTheViking/googledriveannex/issues) with e.g. grave ones like dropping content removed on the drive as well... Just wondered ;-)
Hugo, I didn't write this code, but it looks to me like you could work around the problem by changing line 207 of lib/CommonFunctions.py:
Probably the API used to return a content-length header, and no longer does, or doesn't do so reliably. It does not seem to be used for anything too important -- this change will break git-annex's progress display a little bit, perhaps.
The Google Drive interface tells me:
Size 29,776,826 bytes
I moved a big PDF to Google Drive (with shared encryption).
Now, when I try to get it again:
It works for smaller files. Is there a limit on the file size?
Hi Johnny,
I wrote a patch for googledriveannex that fixed this problem for me. First you add the google drive special remote in repo1 then you clone repo1 into repo2. In repo2 you do "git annex enableremote googldrivespecialremotename" and it should work. The problem was that the init method, that is called by git annex when a special remote is first created but also when it is enabled somewhere else, did not factor in the possibility that it had already been created. I will simultaneously submit the patch to the author of the special remote plugin but here it is for you to quickly get going:
Hi,
I am new to git-annex and I want to use google drive as remote but I can't.
I create syslink to
googledriveannex
in/usr/local/bin
.When I execute below command, command waiting but not make anything:
$ git annex initremote googledrive type=external externaltype=googledrive encryption=shared folder=gitannex
initremote googledrive (encryption setup)
# Waiting but does not do anything.What I am doing wrong?
Thanks for helps
Following the instructions above, when issuing:
googleannexdrive fails and I get:
Am I making some obvious mistake?
If not, I'd like to share my positive experience with git-annex-remote-rclone (https://github.com/DanielDent/git-annex-remote-rclone), which wraps rclone (https://rclone.org) that supports Google Drive: it worked for me.
I couldn't get this to run and had a lot of performance issues with rclone on Google Drive, so I adapted the rclone wrapper to gdrive. It's running fine so far, so I thought I share it:
https://github.com/Lykos153/git-annex-remote-gdrive
I have not heard from TobiasTheViking in a while, unfortunately.
Whether this could be supported in git-anenx depends on whether a haskell API comes available.
Google Cloud Storage might be a better option; it is supported in git-annex via the S3 remote, as well as having an actively maintained external special remote.