More SSH Agent playing.
This commit is contained in:
parent
451d745b19
commit
98f4757a38
4
.bashrc
4
.bashrc
|
@ -108,9 +108,11 @@ export GOPATH=${HOME}/src/go
|
|||
if [ -z "${SSH_AUTH_SOCK}" ]; then
|
||||
SSH_AUTH_SOCK_FILE=~/.ssh/auth_sock
|
||||
if [ -S ${SSH_AUTH_SOCK_FILE} ]; then
|
||||
SSH_AUTH_SOCK=${SSH_AUTH_SOCK_FILE}
|
||||
export SSH_AUTH_SOCK=${SSH_AUTH_SOCK_FILE}
|
||||
export SSH_AGENT_PID=$(cat ~/.ssh/agent.pid)
|
||||
else
|
||||
eval `ssh-agent -a ${SSH_AUTH_SOCK_FILE} -s`
|
||||
echo ${SSH_AGENT_PID} > ~/.ssh/agent.pid
|
||||
ssh-add
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue