{"id":92,"date":"2007-02-22T11:14:56","date_gmt":"2007-02-21T23:14:56","guid":{"rendered":"http:\/\/craig.dubculture.co.nz\/blog\/2007\/02\/22\/gpg-agent-doesnt-prompt-for-my-passphrase\/"},"modified":"2010-08-28T17:36:47","modified_gmt":"2010-08-28T16:36:47","slug":"gpg-agent-doesnt-prompt-for-my-passphrase","status":"publish","type":"post","link":"http:\/\/craig.dubculture.co.nz\/blog\/2007\/02\/22\/gpg-agent-doesnt-prompt-for-my-passphrase\/","title":{"rendered":"GPG agent doesn't prompt for my passphrase"},"content":{"rendered":"<p>Something that has always bothered me; I use the <a href=\"http:\/\/www.debian-administration.org\/articles\/452\">gpg-agent<\/a> program to cache my passphrase in memory, but if I call it from dpkg-buildpackage or <a href=\"https:\/\/launchpad.net\/falcon\">falcon<\/a>, it just does this:<\/p>\n<pre class=\"tightenable\">You need a passphrase to unlock the secret key for\r\nuser: \"IT Partners &lt;packages@itpartners.co.nz&gt;\"\r\n1024-bit DSA key, ID xxxxxxx, created 2005-04-21\r\n\r\ngpg: cancelled by user\r\ngpg: skipped \"xxxxxxxx\": bad passphrase<\/pre>\n<p>Why does it punish me so?  Turns out that pinentry, the program that asks for the passphrase, can't find a terminal, so can't run, and the key doesn't get cached.<\/p>\n<p>To fix this, you can set the <tt>GPG_TTY<\/tt> variable, which I do in my .bashrc like so: <tt>export GPG_TTY=`tty`<\/tt><\/p>\n<p>Problem solved. And <a href=\"http:\/\/www.wlug.org.nz\/GpgAgentNotes\">added to the WLUG wiki for posterity<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Something that has always bothered me; I use the gpg-agent program to cache my passphrase in memory, but if I call it from dpkg-buildpackage or falcon, it just does this: You need a passphrase to unlock the secret key for user: \"IT Partners &lt;packages@itpartners.co.nz&gt;\" 1024-bit DSA key, ID xxxxxxx, created 2005-04-21 gpg: cancelled by user [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[66],"tags":[28,42,8,19],"_links":{"self":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/posts\/92"}],"collection":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=92"}],"version-history":[{"count":1,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":394,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions\/394"}],"wp:attachment":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}