Question

After running

eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa

and entering my passphrase, git still prompts me to enter the passphrase every time I perform a remote action.

To illustrate:

bash-4.1$ echo $SSH_AUTH_SOCK
/tmp/ssh-cWNDloIzZkhW/agent.5560
bash-4.1$ ssh-add -l
2048 <fingerprint> /cygdrive/c/Users/<username>/.ssh/id_rsa (RSA)
bash-4.1$ git pull
Enter passphrase for key '/cygdrive/c/Users/<username>/.ssh/id_rsa':
Was it helpful?

Solution

The problem turns out to be that git was using cygwin's ssh, which looks at a different /tmp than git does. I previously renamed the ssh under /git/bin since I thought it caused issues. Renaming it back made everything work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top