Recent comments posted to this site:

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:

diff --git a/git-annex-remote-googledrive b/git-annex-remote-googledrive
index 49cd917..c8e70f3 100755
--- a/git-annex-remote-googledrive
+++ b/git-annex-remote-googledrive
@@ -330,13 +330,16 @@ def initremote(line):
     oauth = os.getenv("OAUTH") or ""
     encryption = common.getConfig("encryption")
     myfolder = common.getConfig("folder")
-    stored_creds = sys.modules["__main__"].login({"oauth": oauth})
-    if len(myfolder) and stored_creds:
-        common.sprint('SETCONFIG myfolder ' + myfolder + '')
-        common.sprint('SETCONFIG stored_creds ' + json.dumps(stored_creds) + '')
-        common.sprint('INITREMOTE-SUCCESS')
+    if not common.getConfig("stored_creds"):
+       stored_creds = sys.modules["__main__"].login({"oauth": oauth})
+       if len(myfolder) and stored_creds:
+           common.sprint('SETCONFIG myfolder ' + myfolder + '')
+           common.sprint('SETCONFIG stored_creds ' + json.dumps(stored_creds) + '')
+           common.sprint('INITREMOTE-SUCCESS')
+       else:
+           common.sprint('INITREMOTE-FAILURE You need to set OAUTH environment variables and folder and encryption parameters when running initremote.')
     else:
-        common.sprint('INITREMOTE-FAILURE You need to set OAUTH environment variables and folder and encryption parameters when running initremote.')
+           common.sprint('INITREMOTE-SUCCESS')
     common.log("Done")

 def prepare(line):
-- 
Thanks Joey, I could construct a scenario where the auto-conflict-resolution was applied in the master branch.
I tried the master branch of gitolite today on my server, and it works fine! Updated the wiki with the commands I used to setup gitolite.
@Mesut, I think you're doing everything right. It can take a long time for the highly secure gpg key to be generated. Sit tight and let it finish, or you can pass --fast to generate a key that is a tiny bit less secure.
Comment by http://joeyh.name/ Thu Apr 17 20:58:41 2014

@anarcat, I have modified pre-commit-annex so if it's passed already annexed files, it'll extract their metadata.

So this can be used to add metadata to files added before you installed the hook, or if you've configured more fields to be extracted.

Comment by http://joeyh.name/ Thu Apr 17 20:15:07 2014

@Matthias, here is an example of git-annex merge updating the master branch from the synced/master branch that was pushed to it earlier:

joey@darkstar:~/tmp/test/2>git annex merge
merge git-annex (merging synced/git-annex into git-annex...)
ok
merge synced/master 
Updating 7942eee..1f3422e
Fast-forward
 new_file | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 new_file
ok

If you are having trouble with it somehow, I'd suggest filing a bug report.

Comment by http://joeyh.name/ Thu Apr 17 20:00:22 2014

You can use git annex enableremote to change an existing remote's configuration. So this should work:

# export AWS_ACCESS_KEY_ID="newRANDOMGOBBLDEYGOOK"
# export AWS_SECRET_ACCESS_KEY="news3kr1t"
# git annex enableremote cloud
Comment by http://joeyh.name/ Thu Apr 17 19:44:55 2014
If I revoke old AWS credentials and create new ones, how would I inform git-annex of the change to AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY?
Comment by annexuser Tue Apr 15 21:59:43 2014

it's pretty awesome to have 1TB of free storage like that out there... but for storing photos, it could be improved - I filed a few bugs on the github repo here:

https://github.com/TobiasTheViking/flickrannex/issues/created_by/anarcat?state=open

thanks!

Comment by https://id.koumbit.net/anarcat Tue Apr 15 04:47:17 2014

@joeyh: This must be a misunderstanding of what I want. I use version 5.20140320. I can't find a workflow where "git annex merge" changes my master branch, it only updates the git-annex branch.

Thinking again of it after some time, I am basically fine with "git annex sync". The only thing I am uncomfortable with is that the automatic merge is pushed without review.

Comments on this page are closed.