Compare commits

..

No commits in common. "gpg-ssh-fix" and "master" have entirely different histories.

2 changed files with 7 additions and 13 deletions

View File

@ -41,16 +41,12 @@ if grep 'enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then
gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
}
add-zsh-hook preexec _gpg-agent-update-tty
_gpg-agent-update-tty
fi
# Clean up.
unset _gpg_agent_{conf,env}
# Disable GUI prompts inside SSH.
#if [[ -n "$SSH_CONNECTION" ]]; then
# export PINENTRY_USER_DATA='USE_CURSES=1'
#fi
# Disable GUI prompts
if [[ -n "$SSH_CONNECTION" ]]; then
export PINENTRY_USER_DATA='USE_CURSES=1'
fi

View File

@ -19,17 +19,15 @@ _ssh_agent_env="${_ssh_agent_env:-${TMPDIR:-/tmp}/ssh-agent.env}"
# Set the path to the persistent authentication socket.
_ssh_agent_sock="${TMPDIR:-/tmp}/ssh-agent.sock"
source "$_ssh_agent_env" 2> /dev/null
# Start ssh-agent if not started.
if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
# Export environment variables.
source "$_ssh_agent_env" 2> /dev/null
# # Start ssh-agent if not started.
# if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
# eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")"
# fi
# Start ssh-agent if not started.
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")"
fi
fi
# Create a persistent SSH authentication socket.