[pkg-gnupg-maint] Bug#851462: Bug#851462: #851462 gpg-agent: a gpg-agent is already running - not starting a new one

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Apr 25 21:55:18 UTC 2017


Hi Thomas--

I'm sorry, but i don't understand what you're trying to do here.  I'm
re-closing this bug report (#851462) because it doesn't seem to be
related to the original report anyway, other than the string "gpg-agent
is already running" appearing in both of them.

I've asked you some questions below about what you're trying to do --
feel free to open a new bug report when answering them with a clearer
description (or to reopen this one again if you're sure this is the same
issue).

On Sat 2017-02-11 19:51:29 -0500, Thomas Dickey wrote:
> It's broken, and recently.  I noticed this about a week ago.
>
> On my machines, I mostly use ssh to connect, and have a script which
> ties together gpg/ssh, using gpg-agent.  I do this to get the keys
> for both in - package signing and network connections.

"to get the keys for both in" what?

> Here's the script:
>
> #!/bin/sh
> # $Id: wrapssh,v 1.9 2015/12/21 09:47:59 tom Exp $
> # vi:ts=4 sw=4
> # Initialize a subshell which will run ssh-agent, sets a variable that we can
> # use in the initialization to force an ssh-add prompt.
>
> unset SSH_AGENT_PID
> unset SSH_AUTH_SOCK
> unset SSH2_AUTH_SOCK
> unset SSH2_AGENT_PID
>
> if test -f /usr/bin/ssh-agent
> then
> 	SSH_ADD="passphrase"
> 	export SSH_ADD
> 	if test -f /usr/bin/gpg-agent && test -f /usr/bin/pinentry-curses
> 	then
> 		killall gpg-agent 2>/dev/null
> 		ssh-agent presign
> 	else
> 		ssh-agent $SHELL
> 	fi
> fi

why are you doing "killall gpg-agent" ?  what do you hope to gain from that?

what is "presign" ?  is that the script below?

> ...and it calls back with a new shell (tcsh in my case) to activate this:
>
> if ( $?GPG_ADD ) then
> 	setenv GPG_TTY `tty`
> 	unsetenv GPG_ADD
> 	echo "GPG-signing on $GPG_TTY ..."
> 	if ( -e /usr/bin/gpg ) then
> 		echo | gpg -s >/dev/null
> 	else
> 		echo | gpg2 -s >/dev/null
> 	endif
> 	echo "...GPG-signing"
> endif
> if ( $?SSH_ADD ) then
> 	echo "prompt $SSH_ADD"
> 	unsetenv SSH_ADD
> 	ssh-add
> endif

the trace (below) doesn't seem to trace into this stuff, does it?  I
don't speak tsch fluently, and i don't understand what the SSH_ADD and
GPG_ADD environment variables are trying to do here.  can you explain?

> With the newly broken package, I don't get a gpg-prompt.  
> Ditto for ssh-prompt.  What I get is this (turning on the trace):
>
> ~ (101) sh -x wrapssh
> + unset SSH_AGENT_PID
> + unset SSH_AUTH_SOCK
> + unset SSH2_AUTH_SOCK
> + unset SSH2_AGENT_PID
> + test -f /usr/bin/ssh-agent
> + SSH_ADD=passphrase
> + export SSH_ADD
> + test -f /usr/bin/gpg-agent
> + test -f /usr/bin/pinentry-curses
> + killall gpg-agent
> + ssh-agent presign
> gpg-agent[1791]: reading options from '/users/tom/.gnupg/gpg-agent.conf'
> gpg-agent[1791]: WARNING: "--write-env-file" is an obsolete option - it has no effect
> gpg-agent[1791]: enabled debug flags: cache ipc
> gpg-agent: a gpg-agent is already running - not starting a new one
> gpg-agent: secmem usage: 0/65536 bytes in 0 blocks
>
> By the way, I don't have a gpg-agent.conf (so that's another error).

Are you saying that /users/tom/.gnupg/gpg-agent.conf doesn't exist, but
gpg-agent is somehow claiming that it does?


Regards,

        --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/attachments/20170425/0ffeaabd/attachment.sig>


More information about the pkg-gnupg-maint mailing list