Skip to content

Instantly share code, notes, and snippets.

@maateen
Created August 14, 2016 11:56
Show Gist options
  • Save maateen/a8e744bc12f2d19f2590c2e93c518668 to your computer and use it in GitHub Desktop.
Save maateen/a8e744bc12f2d19f2590c2e93c518668 to your computer and use it in GitHub Desktop.
Add this to your ~/.bashrc:
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
Source: http://unix.stackexchange.com/a/217223/109606
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment