GPG + SSH agent

This commit is contained in:
Vladan Popovic 2019-07-29 18:10:44 +02:00
parent 91823e06eb
commit e4aa603888
3 changed files with 10 additions and 0 deletions

View File

@ -31,3 +31,5 @@ unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh" export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
fi fi
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null

6
.gnupg/gpg-agent.conf Normal file
View File

@ -0,0 +1,6 @@
default-cache-ttl 3600
pinentry-program /usr/bin/pinentry-curses
max-cache-ttl 72000
default-cache-ttl 72000
max-cache-ttl-ssh 72000
default-cache-ttl-ssh 72000

2
.pam_environment Normal file
View File

@ -0,0 +1,2 @@
SSH_AGENT_PID DEFAULT=
SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"