Compare commits
No commits in common. "gpg-ssh-fix" and "master" have entirely different histories.
gpg-ssh-fi
...
master
@ -41,16 +41,12 @@ if grep 'enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then
|
|||||||
gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
|
gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
|
||||||
}
|
}
|
||||||
add-zsh-hook preexec _gpg-agent-update-tty
|
add-zsh-hook preexec _gpg-agent-update-tty
|
||||||
_gpg-agent-update-tty
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up.
|
# Clean up.
|
||||||
unset _gpg_agent_{conf,env}
|
unset _gpg_agent_{conf,env}
|
||||||
|
|
||||||
# Disable GUI prompts inside SSH.
|
# Disable GUI prompts inside SSH.
|
||||||
#if [[ -n "$SSH_CONNECTION" ]]; then
|
if [[ -n "$SSH_CONNECTION" ]]; then
|
||||||
# export PINENTRY_USER_DATA='USE_CURSES=1'
|
|
||||||
#fi
|
|
||||||
|
|
||||||
# Disable GUI prompts
|
|
||||||
export PINENTRY_USER_DATA='USE_CURSES=1'
|
export PINENTRY_USER_DATA='USE_CURSES=1'
|
||||||
|
fi
|
||||||
|
@ -19,17 +19,15 @@ _ssh_agent_env="${_ssh_agent_env:-${TMPDIR:-/tmp}/ssh-agent.env}"
|
|||||||
# Set the path to the persistent authentication socket.
|
# Set the path to the persistent authentication socket.
|
||||||
_ssh_agent_sock="${TMPDIR:-/tmp}/ssh-agent.sock"
|
_ssh_agent_sock="${TMPDIR:-/tmp}/ssh-agent.sock"
|
||||||
|
|
||||||
source "$_ssh_agent_env" 2> /dev/null
|
|
||||||
|
|
||||||
# Start ssh-agent if not started.
|
# Start ssh-agent if not started.
|
||||||
if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
|
if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
|
||||||
# Export environment variables.
|
# Export environment variables.
|
||||||
source "$_ssh_agent_env" 2> /dev/null
|
source "$_ssh_agent_env" 2> /dev/null
|
||||||
|
|
||||||
# # Start ssh-agent if not started.
|
# Start ssh-agent if not started.
|
||||||
# if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
|
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")"
|
eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")"
|
||||||
# fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a persistent SSH authentication socket.
|
# Create a persistent SSH authentication socket.
|
||||||
|
Reference in New Issue
Block a user