gpg
This commit is contained in:
parent
d2eb5dd011
commit
abe546de10
3 changed files with 16 additions and 8 deletions
12
bash/alias/gpg.sh
Normal file
12
bash/alias/gpg.sh
Normal 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 \
|
||||||
|
"
|
|
@ -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
4
bash/gpg.sh
Normal 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
|
Loading…
Reference in a new issue