From 52872bc4fb3cfe25dc60db91b03c84adca0e5c46 Mon Sep 17 00:00:00 2001 From: "Douglas S.D. Hall" Date: Mon, 20 Apr 2015 17:50:58 +0100 Subject: [PATCH 1/2] Never start gpg agent with ssh-agent enabled on OSX. ssh-agent starts automatically even if not running once an ssh session is started, and things get confused if gpg-agent has ssh-support. --- plugins/gpg-agent/gpg-agent.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/gpg-agent/gpg-agent.plugin.zsh b/plugins/gpg-agent/gpg-agent.plugin.zsh index 3e6a34f42..58b923181 100644 --- a/plugins/gpg-agent/gpg-agent.plugin.zsh +++ b/plugins/gpg-agent/gpg-agent.plugin.zsh @@ -30,6 +30,8 @@ if ! gpg-connect-agent --quiet /bye > /dev/null 2> /dev/null; then if ssh-add -l > /dev/null 2> /dev/null; then # ssh-agent running, start gpg-agent without ssh support start_agent_nossh; + else if [][ "$OSTYPE" = "darwin"* ]; then + start_agent_nossh else # otherwise start gpg-agent with ssh support start_agent_withssh; From 295cd8207fc2ed8a0a1d886721e6872172507b1a Mon Sep 17 00:00:00 2001 From: "Douglas S.D. Hall" Date: Tue, 21 Apr 2015 20:00:01 +0100 Subject: [PATCH 2/2] typo in elseif --- plugins/gpg-agent/gpg-agent.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gpg-agent/gpg-agent.plugin.zsh b/plugins/gpg-agent/gpg-agent.plugin.zsh index 58b923181..176099a55 100644 --- a/plugins/gpg-agent/gpg-agent.plugin.zsh +++ b/plugins/gpg-agent/gpg-agent.plugin.zsh @@ -30,7 +30,7 @@ if ! gpg-connect-agent --quiet /bye > /dev/null 2> /dev/null; then if ssh-add -l > /dev/null 2> /dev/null; then # ssh-agent running, start gpg-agent without ssh support start_agent_nossh; - else if [][ "$OSTYPE" = "darwin"* ]; then + elif [[ "$OSTYPE" = "darwin"* ]]; then start_agent_nossh else # otherwise start gpg-agent with ssh support