Kept receiving these errors when trying to execute commands on the remote server, ( with capistrano ) while forwarding my SSH keys:
Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
This link offered the solution. I ran:
and the output was:
The agent has no identities.
Then, I’ve added the key:
Confirmed that it appears in ssh-add -L:
And after this step, the ssh key was properly forwarded.