<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gnupg &#8211; Luxing Huang</title>
	<atom:link href="https://luxing.im/tag/gnupg/feed/" rel="self" type="application/rss+xml" />
	<link>https://luxing.im</link>
	<description>Thoughs and things</description>
	<lastBuildDate>Sun, 21 Feb 2016 05:04:14 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
<site xmlns="com-wordpress:feed-additions:1">58771605</site>	<item>
		<title>Enabling gpg-agent</title>
		<link>https://luxing.im/enabling-gpg-agent/</link>
					<comments>https://luxing.im/enabling-gpg-agent/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Sun, 21 Feb 2016 05:02:14 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[agent]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[gnupg]]></category>
		<category><![CDATA[gpg]]></category>
		<category><![CDATA[setup]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=614</guid>

					<description><![CDATA[When I was following this tutorial to setup GnuPG for mutt account profiles on my personal laptop, I hit gpg-agent is not available in this session error when I was trying to decrypt my profile. Also, I have to type my password for every time when I try decryption. This is annoying. With a little &#8230; <p class="link-more"><a href="https://luxing.im/enabling-gpg-agent/" class="more-link">Continue reading<span class="screen-reader-text"> "Enabling gpg-agent"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>When I was following <a href="http://xmodulo.com/mutt-email-client-encrypted-passwords.html" target="_blank">this</a> tutorial to setup GnuPG for mutt account profiles on my personal laptop, I hit <code>gpg-agent is not available in this session</code> error when I was trying to decrypt my profile. Also, I have to type my password for every time when I try decryption.</p>
<p>This is annoying.<br />
<span id="more-614"></span></p>
<p>With a little poking around, I found 2 reasons that could affect my setup. First, the gpg-agent.conf under ~/.gnupg. My current setup is:</p>
<pre>
default-cache-ttl 999999
max-cache-ttl 999999
ignore-cache-for-signing
</pre>
<p>Obviously I maxed-out the expiration time gpg-agent stores my password in cache (the default-cache-ttl value. It used to be 0).</p>
<p>Secondly, I installed gnupg2 long time ago and I was using gpg-agent for GnuPG 2, the gpg command is actually from GnuPG 1. This confused me a little to figure out. Make sure to use <code>gpg2</code> command rather than <code>gpg</code>.</p>
<p>If you are encrypting mutt profile too, make sure to use <code>gpg2</code> everywhere.</p>
<p>Finally, run this at boot time to start an agent daemon.</p>
<pre>gpg-agent --daemon --allow-preset-passphrase</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/enabling-gpg-agent/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">614</post-id>	</item>
	</channel>
</rss>
