25 lines
819 B
Plaintext
25 lines
819 B
Plaintext
|
# Start GPG and SSH agents
|
||
|
export GPG_TTY=$(tty)
|
||
|
eval $(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info")
|
||
|
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"
|
||
|
export GPG_AGENT_INFO
|
||
|
export SSH_AUTH_SOCK
|
||
|
export SSH_AGENT_PID
|
||
|
else
|
||
|
echo "Howdy, user ID ${EUID}. Shenanigans beget shenanigans."
|
||
|
# not needed this because we have .ssh/config
|
||
|
# but keep this uncommented because Git is being
|
||
|
# an dougebag in every single shell sessiob.
|
||
|
source ~/.dotfiles/bin/source-ssh-agent
|
||
|
fi
|
||
|
|
||
|
# Run this with add-ssh-keys instead
|
||
|
#ssh-add $HOME/.ssh/github-personal
|
||
|
|
||
|
# Then add my scripts
|
||
|
export DOTFILES_STUFF_BIN="$HOME/.dotfiles/bin"
|
||
|
export PATH=$PATH:$DOTFILES_STUFF_BIN
|