diff options
Diffstat (limited to 'doc/bugs/cannot_determine_uuid_for_origin.mdwn')
-rw-r--r-- | doc/bugs/cannot_determine_uuid_for_origin.mdwn | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/doc/bugs/cannot_determine_uuid_for_origin.mdwn b/doc/bugs/cannot_determine_uuid_for_origin.mdwn new file mode 100644 index 000000000..611a0f236 --- /dev/null +++ b/doc/bugs/cannot_determine_uuid_for_origin.mdwn @@ -0,0 +1,135 @@ +[[!toc]] + +### Please describe the problem. + +I get this error when trying to copy annexed files from my laptop to the bare repository on my server: + + anarcat@angela:ohm2013$ git annex copy -t origin . + git-annex: cannot determine uuid for origin + +### What steps will reproduce the problem? + +Here's my setup: + + * `angela`: regular git repository on my laptop (`angela`) where i ran `git annex init` and `git annex add`ed 4 big files (in `~anarcat/presentations/ohm2013`) + * `marcos-bare`: a bare git repository where i ran `git annex init` on a different server (`marcos`) (in `~anarcat/repos/presentations/ohm2013.git`) + * `marcos-checkout`: a checkout of the above repository on marcos (in `~anarcat/presentations/ohm2013`) + +I ran `git pull/push` everwhere in there, and still get the error. + +Remotes on all repos: + + * `angela`: `origin anarcat.ath.cx:repos/presentations/ohm2013.git` + * `marcos-bare`: no remote + * `marcos-checkout`: `origin /home/anarcat/repos/presentations/ohm2013.git` + +Note that file added with `git annex addurl` on `marcos-checkout` properly gets propagated on `angela` once i do `git annex get` there. + +### What version of git-annex are you using? On what operating system? + +`angela` runs: + +[[!format txt """ +git-annex version: 4.20130730-ge59a8c6 +build flags: Assistant Webapp Pairing Testsuite S3 WebDAV Inotify DBus XMPP DNS +local repository version: 3 +default repository version: 3 +supported repository versions: 3 4 +upgrade supported from repository versions: 0 1 2 +"""]] + +I was able to reproduce with the backport version too. + +I compiled it by hand from git. + +`marcos` runs: + +[[!format txt """ +git-annex version: 3.20120629 +local repository version: unknown +default repository version: 3 +supported repository versions: 3 +upgrade supported from repository versions: 0 1 2 +"""]] + +### Please provide any additional information below. + +In addition, there's this error on `marcos-bare`: + +[[!format sh """ +anarcat@marcos:ohm2013.git$ git annex status -d +supported backends: SHA256 SHA1 SHA512 SHA224 SHA384 SHA256E SHA1E SHA512E SHA224E SHA384E WORM URL +supported remote types: git S3 bup directory rsync web hook +trusted repositories: git ["--git-dir=/home/anarcat/repos/presentations/ohm2013.git","show-ref","git-annex"] +git ["--git-dir=/home/anarcat/repos/presentations/ohm2013.git","show-ref","--hash","refs/heads/git-annex"] +git ["--git-dir=/home/anarcat/repos/presentations/ohm2013.git","log","refs/heads/git-annex..6063e958c02259a39b87d0f1dc44c9272c52df3f","--oneline","-n1"] +git ["--git-dir=/home/anarcat/repos/presentations/ohm2013.git","cat-file","--batch"] +0 +semitrusted repositories: 4 + 00000000-0000-0000-0000-000000000001 -- web + 5868f840-02e7-11e3-94e9-9b3701bd28bb -- marcos-checkout + aafdd242-02e7-11e3-bb6a-6f16a5c6103e -- here (marcos-bare) + befc3057-d23d-4312-843a-0645e93107d8 -- angela +untrusted repositories: 0 +dead repositories: 0 +available local disk space: 14 gigabytes (+1 megabyte reserved) +local annex keys: 0 +local annex size: 0 bytes +known annex keys: git ["--git-dir=/home/anarcat/repos/presentations/ohm2013.git","ls-files","--cached","-z","--","/home/anarcat/repos/presentations/ohm2013.git"] +fatal: '/home/anarcat/repos/presentations/ohm2013.git' is outside repository +0 +known annex size: 0 bytes +bloom filter size: 16 mebibytes (0% full) +backend usage: +"""]] + +### Workaround! + +I found that I could succesfully push to the non-bare repo, like this: + +[[!format txt """ +anarcat@angela:ohm2013$ git remote add marcos-checkout ssh://anarcat.ath.cx/~/presentations/ohm2013 +anarcat@angela:ohm2013$ git fetch marcos-checkout +From ssh://anarcat.ath.cx/~/presentations/ohm2013 + * [new branch] git-annex -> marcos-checkout/git-annex + * [new branch] master -> marcos-checkout/master +anarcat@angela:ohm2013$ git annex copy AlerteRouge.webm --to marcos-checkout +copy AlerteRouge.webm (checking marcos-checkout...) (to marcos-checkout...) +SHA256E-s138903105--a69db8d4c3835b03bdb08cb1cccfde5c76f586f934d63283694e7101b25352a8.webm +[...] +"""]] + +It seems that git-annex doesn't like bare repos at all... + +### Fix + +It seems that my problem was specifically related to [[bare repositories]], which are not well supported historically. There has been other reports of problems in the past, which I missed in my search because symptoms were different: + + * [[bugs/bare git repos]] + * [[forum/get and copy with bare repositories]] + +Yet while I was able to do `git annex get --all` *from* the `marcos-bare` repository, I still get the original error message while trying to `git annex copy -t marcos-bare`, which is pretty annoying considering the original files are on my laptop, which is not publicly accessible. So I basically need to add the `marcos-checkout` as a remote, copy there, then get from the bare repo to make this work, which is a rather convoluted way of doing things. :) + +It seems to me a proper fix would be to be able to `git annex copy --to marcos-bare`. Thanks! + +Update: it seems te problem was that I had the following in my `.git/config`: + + [remote "marcos-bare"] + url = ssh://anarcat.ath.cx/~/repos/presentations/ohm2013.git + annex-ignore = true + fetch = +refs/heads/*:refs/remotes/marcos-bare/* + +I have *no* idea how that `annex-ignore` got there, but that was the root of my problem. Removing it it allowed my to do `git annex copy`. I really don't know how this happened, but I guess this is [[done]], although I believe this error message is really confusing and could be improved. --[[anarcat]] + +> `annex-ignore` is set automatically by git-annex if it fails to query +> the uuid of a remote the first time it tries to use it. It will say +> when it does that. The assumption +> is that a remote whose uuid cannot be looked up is a git remote +> on a server w/o git-annex support (like github) and it would be annoying +> to constantly be trying and failing to get that uuid. +> +> So, I've improved the error message. Now when annex-ignore is set +> for a remote, the error you got will mention that. +> +> (Also, there is not currently anything lacking in git-annex's support +> for bare repositories.) --[[Joey]] |