bashrc: Shenanigans beget shenanigans
Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
parent
b563b8dbf6
commit
265ad25cae
7
.bashrc
7
.bashrc
|
@ -1,14 +1,15 @@
|
||||||
# Start GPG and SSH agents
|
# Start GPG and SSH agents
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
gpg-agent --daemon --enable-ssh-support \
|
eval $(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")
|
||||||
--write-env-file "${HOME}/.gpg-agent-info"
|
|
||||||
if [ -f "${HOME}/.gpg-agent-info" ]; then
|
if [ -f "${HOME}/.gpg-agent-info" ]; then
|
||||||
|
# gpg-agent[****]: WARNING: "--write-env-file" is an obsolete
|
||||||
|
# option - it has no effect
|
||||||
. "${HOME}/.gpg-agent-info"
|
. "${HOME}/.gpg-agent-info"
|
||||||
export GPG_AGENT_INFO
|
export GPG_AGENT_INFO
|
||||||
export SSH_AUTH_SOCK
|
export SSH_AUTH_SOCK
|
||||||
export SSH_AGENT_PID
|
export SSH_AGENT_PID
|
||||||
else
|
else
|
||||||
eval $(ssh-agent -s)
|
echo "Howdy, user ID ${EUID}. Shenanigans beget shenanigans. $(eval $(ssh-agent -s))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run this with add-ssh-keys instead
|
# Run this with add-ssh-keys instead
|
||||||
|
|
Loading…
Reference in New Issue