This commit is contained in:
Marc Beninca 2023-05-15 09:01:00 +02:00
parent d2eb5dd011
commit abe546de10
3 changed files with 16 additions and 8 deletions

12
bash/alias/gpg.sh Normal file
View file

@ -0,0 +1,12 @@
# turn gpg agent off
alias gpgoff="\
gpgconf \
--kill \"gpg-agent\" \
"
# bind gpg agent to current tty
alias gpgtty="\
gpg-connect-agent \
updatestartuptty \
/bye \
"

View file

@ -1,8 +0,0 @@
if [ ${EUID} -ne 0 ] ; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
gpg-connect-agent updatestartuptty /bye > /dev/null
fi
alias gpgoff='gpgconf --kill gpg-agent'
alias gpgtty='gpg-connect-agent updatestartuptty /bye'

4
bash/gpg.sh Normal file
View file

@ -0,0 +1,4 @@
if [ ${EUID} -ne 0 ] ; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
gpg-connect-agent updatestartuptty /bye > '/dev/null'
fi