Compare commits
4 Commits
master
...
gpg-ssh-fi
Author | SHA1 | Date | |
---|---|---|---|
746928646e | |||
9f5301e16f | |||
4e012e503e | |||
73e4345aee |
@ -41,12 +41,16 @@ 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
|
||||
#if [[ -n "$SSH_CONNECTION" ]]; then
|
||||
# export PINENTRY_USER_DATA='USE_CURSES=1'
|
||||
#fi
|
||||
|
||||
# Disable GUI prompts
|
||||
export PINENTRY_USER_DATA='USE_CURSES=1'
|
||||
|
@ -19,15 +19,17 @@ _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.
|
||||
|
Reference in New Issue
Block a user