In mac os x the ssh-agent needs to have a special configuration, because not all the ssh keys are loaded. This changes must be included in the '~/.ssh/config' file, one by key.
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa_2