Sometimes, when you run ssh-add, you probably will see this error message:

Could not open a connection to your authentication agent


Here I'll show two simpl and quick solutions:

1, restart your computer, or restart your X.
2, run this command to fork a new shell, then use ssh-add in this new shell:
Code:
$ ssh-agent /bin/bash
$ ssh-add