You are not logged in.
I've recently installed arch on new machine. I am encountering an issue on this machine which I do not encounter on my other machines.
On my new machine, just like all others, I use keychain for passwordless ssh. I have the following in my ~/.zshrc (which has served me well for years)
if which keychain >/dev/null; then
## hopefully run the ssh keychain
keychain -q ~/.ssh/id_rsa ;
source ~/.keychain/${HOST}-sh;
fi
When I initially login on the new machine, e.g. after a reboot, I get a prompt for my passphrase, and thereafter I can do passwordless ssh. However, every new shell I open provides the following error message
* Error: Failed to start gpg-agent
which is an error I can always replicate if I explicitly run keychain on the command line.
What is strange is that
1) A gpg-agent is running and this is easily verified with a pgrep.
2) The passwordless ssh is still working.
3) This does not happen on my other machines, nor has it ever happened. If an gpg-agent is already running, then every time keychain is invoked explicitly, it says it "Found existing gpg-agent".
The relevant packages, all pacman installed, are
> pacman -Q | grep -E '(keychain|gnupg|gpg)'
gnupg 2.1.0-6
gpgme 1.5.2-1
keychain 2.7.1-3
libgpg-error 1.17-1
Does anyone know why keychain might be failing to find an existing gpg-agent?
Last edited by mjandrews (2014-12-14 00:54:51)
Offline
This was one of the changes after GnuPG 2.1. The message is misleading because it should read "Failed to start because it is already running..."
I got tired of this and just added a check to my .zprofile:
if [[ -z $(pidof ssh-agent) && -z $(pidof gpg-agent) ]]; then
...
Offline
Thanks. I do a similar check in my zshrc.
Offline
And you still get the error message? That fixed it for me...
Offline
And you still get the error message? That fixed it for me...
I did the same thing and it fixed it for me as well.
Offline
Sorry. I made a typo in reply!
Instead of saying "I do a similar check...", I had meant to say "I *will* do a similar check...".
I have done so now and it does work perfectly.
Last edited by mjandrews (2014-12-13 21:22:07)
Offline
Cool. Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline
No problem. I was hesitant to do so initially because I wasn't sure whether, technically speaking, if the original problem was solved, or if it was just avoided. In any case, the problem I was faced with has now ceased to be a problem, so I am happy to mark it as solved.
Last edited by mjandrews (2014-12-14 13:11:31)
Offline
This has now been fixed in upstream, but it's not in a versioned release yet so it probably won't be in [extra] anytime soon. I made an AUR package while we wait for an official release.
Offline