tag:gpgtools.tenderapp.com,2011-11-04:/discussions/problems/23654-gpg-agent-with-strange-behavior-to-meGPGTools: Discussion 2014-07-30T06:53:11Ztag:gpgtools.tenderapp.com,2011-11-04:Comment/337025502014-07-10T18:57:47Z2014-07-10T18:57:47ZGPG-agent with strange behavior (to me)<div><p>Hi Joschka!</p>
<p>Please try to start gpg-agent using this command
instead:<br></p>
<pre>
<code>$(gpg-agent --daemon)</code>
</pre>
<p>If this doesn't work, please send me the following infos:<br>
1. The content of all gpg-agent env vars before and after using
Mail.<br>
2. Your gpg-agent.conf<br>
3. The exact steps you do, when using the gpg-agent for ssh.</p>
<p>Regards, Mento</p></div>Mentotag:gpgtools.tenderapp.com,2011-11-04:Comment/337025502014-07-11T07:20:27Z2014-07-11T07:24:29ZGPG-agent with strange behavior (to me)<div><p>Hi Mento,</p>
<p>thanks for your feedback. Much appreciated!<br>
When changing my <code>.profile</code> to</p>
<pre>
<code>$(gpg-agent --daemon --write-env-file "${HOME}/.gpg-agent-info")
if [ -f "${HOME}/.gpg-agent-info" ]; then
. "${HOME}/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID
fi
GPG_TTY=$(tty)
export GPG_TTY</code>
</pre>
<ol>
<li>
<p>What I found out is as follows:</p>
<ul>
<li>Starting <code>gpg-agent</code> with my <code>.profile</code>
works for the first terminal session only. Multiple times also. But
terminating the sessions and starting a new one screws the ssh
functionality.</li>
<li>Starting Mail.app beforehand isn't much better. ssh function
not present.</li>
<li>Disabling or enabling the <code>--write-env-file</code> switch
doesn't change anything.</li>
<li>It seems that the env's doesn't change in the terminal session
environment regardless what Mail.app does.</li>
</ul>
</li>
<li>
<p>gpg-agent.conf<br></p>
<pre>
<code>pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
allow-mark-trusted
default-cache-ttl 18000
max-cache-ttl 86400
ignore-cache-for-signing
enable-ssh-support</code>
</pre></li>
<li>
<ul>
<li>No <code>gpg-agent</code> is active.</li>
<li>I start a terminal session.</li>
<li><code>ssh user@host</code>, connection successfull.</li>
<li>logging out of ssh session, exiting the terminal.</li>
<li>Opening a new terminal session, again trying to ssh to
host</li>
<li>password prompt.</li>
</ul>
</li>
</ol></div>joschkatag:gpgtools.tenderapp.com,2011-11-04:Comment/337025502014-07-21T16:17:18Z2014-07-21T16:17:18ZGPG-agent with strange behavior (to me)<div><p>Noone? :(</p></div>joschkatag:gpgtools.tenderapp.com,2011-11-04:Comment/337025502014-07-27T10:20:39Z2014-07-27T10:20:40ZGPG-agent with strange behavior (to me)<div><p>I changed to SSH keys as it seems that sadly noone is able to
provide help for my problem.</p></div>joschkatag:gpgtools.tenderapp.com,2011-11-04:Comment/337025502014-07-29T19:39:06Z2014-07-29T19:39:06ZGPG-agent with strange behavior (to me)<div><p>Hey Joschka,</p>
<p>sorry I do not know details about this. May I suggest to get in
touch with the gnupg users mailing list? You can find that here:
<a href=
"http://lists.gnupg.org/mailman/listinfo/gnupg-users">http://lists.gnupg.org/mailman/listinfo/gnupg-users</a></p>
<p>All the best,<br>
steve</p></div>Stevetag:gpgtools.tenderapp.com,2011-11-04:Comment/337025502014-07-29T22:00:46Z2014-07-29T22:01:01ZGPG-agent with strange behavior (to me)<div><p>Hey Steve,</p>
<p>thank you for your response.<br>
I will try. But I cannot imagine that someone on the GnuPG list
will help me with my problem on Mac OSX. The problem presumably
stems from Mail.app and its add-on for GnuPG and some inteference
with the GnuPG installation on my system as you can read above.</p>
<p>Thanks</p>
<p>Joschka</p></div>joschkatag:gpgtools.tenderapp.com,2011-11-04:Comment/337025502014-07-30T06:53:06Z2014-07-30T06:53:06ZGPG-agent with strange behavior (to me)<div><p>I'm not sure - I've never used SSH keys with OpenPGP. But still,
there are many smart people reading that list and chances are
someone might know. If you find out something useful, feel free to
report back.</p></div>Steve