From b97abccae609fac1b5b6dce24a5c6aa505adcb5f Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Tue, 27 Sep 2016 20:47:59 +0100 Subject: [PATCH] Auto-start ssh-agent and add keys --- zshrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zshrc b/zshrc index cb9616c..bce09b0 100644 --- a/zshrc +++ b/zshrc @@ -151,6 +151,13 @@ export PATH="$PATH:/usr/local/opt/go/libexec/bin:$GOPATH/bin" GPG_TTY=`tty` export GPG_TTY +# SSH +if test -z "$SSH_AUTH_SOCK"; then + eval `ssh-agent -s` + ssh-add ~/.ssh/id_jmb + ssh-add ~/.ssh/id_github +fi + # composer global test "$platform" = 'linux' && export PATH="$PATH:/home/jonny/.composer/vendor/bin" test "$platform" = 'osx' && export PATH="$PATH:/Users/jonny/.composer/vendor/bin"