aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-08-17 08:22:43 -0700
committerGravatar Joey Hess <joey@kitenet.net>2012-08-17 08:22:43 -0700
commitdcd208513d24c609719065c51eb176f6b0df3024 (patch)
tree035865be9e0812fb5e01d8abadb5159d924966e5
parent95bfbcd3e3952dc1e22fbc313394c54c3ababad4 (diff)
parentfe8fee235b11e58cfda7e8a09e120b0daabe3f43 (diff)
Merge branch 'master' into assistant
Conflicts: debian/changelog
-rw-r--r--Utility/Gpg.hs2
-rw-r--r--debian/changelog1
-rw-r--r--doc/assistant.mdwn13
-rw-r--r--doc/assistant/thanks.mdwn (renamed from doc/design/assistant/thanks.mdwn)0
-rw-r--r--doc/bugs/gpg_needs_--use-agent.mdwn53
-rw-r--r--doc/design/assistant.mdwn11
-rw-r--r--doc/design/assistant/blog/day_41__foo.mdwn2
-rw-r--r--doc/design/assistant/blog/day_59__dinner.mdwn10
8 files changed, 83 insertions, 9 deletions
diff --git a/Utility/Gpg.hs b/Utility/Gpg.hs
index eed77805c..923f6d5be 100644
--- a/Utility/Gpg.hs
+++ b/Utility/Gpg.hs
@@ -28,7 +28,7 @@ stdParams params = do
b <- getEnv "GPG_BATCH"
let batch = if isNothing e && isNothing b
then []
- else ["--batch", "--no-tty"]
+ else ["--batch", "--no-tty", "--use-agent"]
return $ batch ++ defaults ++ toCommand params
where
-- be quiet, even about checking the trustdb
diff --git a/debian/changelog b/debian/changelog
index a5a1f1134..ef3c21cf7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
git-annex (3.20120808) UNRELEASED; urgency=low
* S3: Add fileprefix setting.
+ * Pass --use-agent to gpg when in no tty mode. Thanks, Eskild Hustvedt.
* init: If no description is provided for a new repository, one will
automatically be generated, like "joey@gnu:~/foo"
diff --git a/doc/assistant.mdwn b/doc/assistant.mdwn
new file mode 100644
index 000000000..6d9bab291
--- /dev/null
+++ b/doc/assistant.mdwn
@@ -0,0 +1,13 @@
+The git-annex assistant makes git-annex easy to use by providing a
+automatic management and syncing of your files, and a friendly web frontend
+for configuration.
+
+The git-annex assistant is being
+[crowd funded on
+Kickstarter](http://www.kickstarter.com/projects/joeyh/git-annex-assistant-like-dropbox-but-with-your-own/).
+[[/assistant/Thanks]] to all my backers.
+
+I blog about my work on the git-annex assistant on a daily basis
+in [[this_blog|design/assistant/blog]]. Follow along!
+
+See also: The [[design|/design/assistant]] pages.
diff --git a/doc/design/assistant/thanks.mdwn b/doc/assistant/thanks.mdwn
index 35ee65320..35ee65320 100644
--- a/doc/design/assistant/thanks.mdwn
+++ b/doc/assistant/thanks.mdwn
diff --git a/doc/bugs/gpg_needs_--use-agent.mdwn b/doc/bugs/gpg_needs_--use-agent.mdwn
new file mode 100644
index 000000000..d9977909b
--- /dev/null
+++ b/doc/bugs/gpg_needs_--use-agent.mdwn
@@ -0,0 +1,53 @@
+git-annex gpg encryption fails here when GPG_AGENT_INFO is set, it needs to be supplied --use-agent to work.
+
+Output from git-annex:
+
+ copy file (to origin...) (gpg) gpg: can't query passphrase in batch mode
+ gpg: decryption failed: secret key not available
+ Command gpg ["--batch","--no-tty","--quiet","--trust-model","always","--decrypt"] failed; exit code 2
+
+ git-annex: user error (Command gpg ["--batch","--no-tty","--quiet","--trust-model","always","--decrypt"] failed; exit code 2)
+ failed
+
+Reproduced on command-line:
+
+ [0 zerodogg@browncoats ~]$ echo test > testfile
+ [0 zerodogg@browncoats ~]$ gpg -e testfile
+ [0 zerodogg@browncoats ~]$ gpg --batch --no-tty --quiet --trust-model always --decrypt testfile.gpg
+ gpg: can't query passphrase in batch mode
+ gpg: decryption failed: secret key not available
+ [2 zerodogg@browncoats ~]$ gpg --use-agent --batch --no-tty --quiet --trust-model always --decrypt testfile.gpg
+ test
+ [0 zerodogg@browncoats ~]$
+
+A patch to fix this issue:
+
+
+ From 77cb02d15245e9ad6e127388adcda960000fb3b8 Mon Sep 17 00:00:00 2001
+ From: Eskild Hustvedt <code@zerodogg.org>
+ Date: Fri, 17 Aug 2012 09:21:44 +0200
+ Subject: [PATCH] Explicitly enable agent to ensure decryption works
+
+ Otherwise gpg will fail when GPG_AGENT_INFO is set in certain cases.
+ ---
+ Utility/Gpg.hs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+ diff --git a/Utility/Gpg.hs b/Utility/Gpg.hs
+ index e13afe5..c28b209 100644
+ --- a/Utility/Gpg.hs
+ +++ b/Utility/Gpg.hs
+ @@ -29,7 +29,7 @@ stdParams params = do
+ b <- getEnv "GPG_BATCH"
+ let batch = if isNothing e && isNothing b
+ then []
+ - else ["--batch", "--no-tty"]
+ + else ["--batch", "--no-tty", "--use-agent"]
+ return $ batch ++ defaults ++ toCommand params
+ where
+ -- be quiet, even about checking the trustdb
+ --
+ 1.7.10.4
+
+> Thanks, [[done]].. I never noticed this since I have use-agent set in
+> gpg.conf. --[[Joey]
diff --git a/doc/design/assistant.mdwn b/doc/design/assistant.mdwn
index 0e49844d0..1e087687c 100644
--- a/doc/design/assistant.mdwn
+++ b/doc/design/assistant.mdwn
@@ -1,10 +1,7 @@
-The git-annex assistant is being
-[crowd funded on Kickstarter](http://www.kickstarter.com/projects/joeyh/git-annex-assistant-like-dropbox-but-with-your-own/).
-[[Thanks]] to all my backers.
+This is the design site for the git-annex [[/assistant]].
-This is my design and plan for developing it.
-Still being fleshed out, still many ideas and use cases to add.
-Feel free to chip in with comments! --[[Joey]]
+Parts of the design is still being fleshed out, still many ideas
+and use cases to add. Feel free to chip in with comments! --[[Joey]]
## roadmap
@@ -23,5 +20,5 @@ Feel free to chip in with comments! --[[Joey]]
## blog
-I'll be blogging about my progress in the [[blog]] on a semi-daily basis.
+I'm blogging about my progress in the [[blog]] on a semi-daily basis.
Follow along!
diff --git a/doc/design/assistant/blog/day_41__foo.mdwn b/doc/design/assistant/blog/day_41__foo.mdwn
index 9115efd62..99a977f60 100644
--- a/doc/design/assistant/blog/day_41__foo.mdwn
+++ b/doc/design/assistant/blog/day_41__foo.mdwn
@@ -31,7 +31,7 @@ Some OS X fixes today..
----
I put together a preliminary page thanking everyone who contributed to the
-git-annex Kickstarter. [[thanks]] The wall-o-names is scary crazy humbling.
+git-annex Kickstarter. [[/assistant/thanks]] The wall-o-names is scary crazy humbling.
----
diff --git a/doc/design/assistant/blog/day_59__dinner.mdwn b/doc/design/assistant/blog/day_59__dinner.mdwn
new file mode 100644
index 000000000..545125ac6
--- /dev/null
+++ b/doc/design/assistant/blog/day_59__dinner.mdwn
@@ -0,0 +1,10 @@
+Actually did do some work on the webapp today, just fixing a bug I noticed
+in a spare moment. Also managed a bit in the plane earlier this week,
+implementing resuming of paused transfers. (Still need to test that.)
+
+But the big thing today was dinner with one of my major Kickstarter
+backers, and as it turned out, "half the Haskell community of San
+Francisco" (3 people). Enjoyed talking about git-annex and haskell with
+them.
+
+I'm looking forward to getting back home and back to work on Monday..