Skip to content

Instantly share code, notes, and snippets.

@maateen
Created September 21, 2016 17:24
Show Gist options
  • Save maateen/1da2c30763898c36db54acd9a1bff4a7 to your computer and use it in GitHub Desktop.
Save maateen/1da2c30763898c36db54acd9a1bff4a7 to your computer and use it in GitHub Desktop.
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
eval `ssh-agent`
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock
fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
ssh-add -l | grep "The agent has no identities" && ssh-add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment