summaryrefslogtreecommitdiff
path: root/doc/bugs/get_from_glacier_fails_too_early.mdwn
blob: 489240330575ce4c1c6ca2e424bf5ba28bd5fb2b (plain)
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
### Please describe the problem.

In order to test the integrity of my file backup on glacier,
I initiated get of a single file from glacier via:

    $ git annex get --from=glacier localdir/myfile.jpg

A check with

    $ glacier job list

confirmed, that a job was in progress.

Then after a couple hours wait the job is complete
[[!format sh """
[ben@voyagerS9 annex]$ glacier job list
i/d 2014-10-16T20:25:23.068Z glacier-bbbbbbbb-bbbb-bbbb-bbbb-MYVAULTbbbbb
a/d 2014-10-16T20:30:13.086Z glacier-bbbbbbbb-bbbb-bbbb-bbbb-MYVAULTbbbbb GPGHMACSHA1--cccccccccccc
"""]]

So, again I enter the get command:
[[!format sh """
[ben@voyagerS9 annex]$ git annex get --from=glacier localdir/myfile.jpg
get localdir/myfile.jpg (from glacier...) (gpg) 
failed                  
git-annex: get: 1 failed
[ben@voyagerS9 annex]$
"""]]

The command immediately fails after entering the gpg passphrase, releasing the shell.
But in the background the glacier-cli is still running, downloads the file from Amazon
and then dumps the gpg encrypted file content into the terminal.
(4 MB of binary character garbage on the screen)

git annex should not fail so early and wait until the data is coming in order to pipe it into gpg.

### What version of git-annex are you using? On what operating system?
Arch Linux git-annex-bin package.
[[!format sh """
[ben@voyagerS9 annex]$ git annex version
git-annex version: 5.20140920-gb0c4300
build flags: Assistant Webapp Webapp-secure Pairing Testsuite S3 WebDAV Inotify DBus DesktopNotify XMPP DNS Feeds Quvi TDFA CryptoHash
key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL
remote types: git gcrypt S3 bup directory rsync web webdav tahoe glacier ddar hook external
local repository version: 5
supported repository version: 5
upgrade supported from repository versions: 0 1 2 4
[ben@voyagerS9 annex]$ gpg --version
gpg (GnuPG) 2.0.26
libgcrypt 1.6.2
"""]]

### Possibly related information about the annexed repo and its history
The file was uploaded sometime earlier this year with a different version of git annex:  Older source package for Arch Linux with Haskell packages from the Arch haskell repos.

The special glacier remote was initially set up with an old gpg key (hybrid encryption), which is still in my keychain but has expired. I exchanged the key with a new one by

    $ git annex enableremote glacier keyid+=NEWKEY keyid-=OLDKEY

I don't know why, but my AWS credentials seem no longer be embedded into the git repo. glacier upload (copy --to=) only succeeds with explicitly set AWS credential environment variables

I tried

    $ git annex enableremote embedcreds=yes

with no noticeable change.
I had changed the AWS credentials a while ago.

Tomorrow I will try to download a just recently uploaded file with the current credentials and keys.

> [[done]];  I am not confident that I understand this failure on retrival,
> and that I've fixed it.  --[[Joey]]