Could not open a connection to your authentication agent

If ssh-add gives the error message: Could not open a connection to your authentication agent, this is because your ssh-agent has stopped running for some reason and is unable to restart automatically. Try removing the ssh environment file.

For example on PUMA:

puma$ rm ~/.ssh/environment.puma

Then log out and back in again. You should then see a message similar to:

Initialising new SSH agent...

And you should then be able to run ssh-add successfully.