Hi Git keeps asking for my password even after I followed https://unix.stackexchange.com/questions/12195/how-to-avoid-being-asked-passphrase-each-time-i-push-to-bitbucket and ran ssh-add
I added the following to my .bashrc
# http://stackoverflow.com/questions/10032461/git-keeps-asking-me-for-my-ssh-key-pas$
SSH_ENV=$HOME/.ssh/environment
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV}
echo succeeded
chmod 600 ${SSH_ENV}
. ${SSH_ENV} > /dev/null
/usr/bin/ssh-add
}
if [ -f "${SSH_ENV}" ]; then
. ${SSH_ENV} > /dev/null
ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
start_agent;
}
else
start_agent;
fi
I just started programming, and have set up a blank ubuntu instance from scratch. However, I did add my id_rsa.pub
to bitbucket already
Any help appreciated, ty