bash: GPG SSH agent
This commit is contained in:
parent
df697759e2
commit
607fa9c573
1 changed files with 10 additions and 0 deletions
10
.bashrc
10
.bashrc
|
@ -37,3 +37,13 @@ if ! "$REMOTE"; then
|
|||
PROMPT_COMMAND="osc7_cwd;$PROMPT_COMMAND"
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# GPG SSH agent
|
||||
if ! "$REMOTE"; then
|
||||
unset SSH_AGENT_PID
|
||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||
# Start if not started
|
||||
gpg-agent --daemon 2>/dev/null
|
||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue