Capistrano cannot read from remote repository

I have found out this problem occurs everytime I close my terminal session.

So everythime I close my terminal session, I get this error when trying to deploy with Capistrano:

Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

With these commands I add an identity to my ssh-agent:

# start the ssh-agent in the background
eval "$(ssh-agent -s)"
# Agent pid 6273
ssh-add ~/.ssh/id_rsa
Identity added: /Users/username/.ssh/id_rsa (/Users/username/.ssh/id_rsa)

but apparantly these settings are lost when I close my terminal session.

Does anyone have an idea how I can make these settings permanent?

thanks for your help,

Anthony

1 Like