1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
[[!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.
|