I'm having an hard time trying to configure Capistrano 3.1 to deploy an app hosted on Github.
I'm following Capistrano Documentation and I have successfully completed the first step (SSH keys from workstation to servers) and on the second one (From our servers to the repository host) I'm able to successfully run ssh -A deploy@one-of-my-servers.com 'git ls-remote git@github.com:my_user/my_repo.git'
:
18f38afz261df35d462f7f4e2ca847d22f148a06 HEAD
18f38afz261df35d462f7f4e2ca847d22f148a06 refs/heads/master
however, ssh deploy@one-of-my-servers.com 'git ls-remote git@github.com:my_user/my_repo.git'
fails:
Permission denied (publickey).
Capistrano docs suggests
If you get the error "host key verification failed." log in into your server and run as the deploy user the command ssh git@github.com to add github.com to the list of known hosts.
SO, I tried so but I get
ssh git@github.com
Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.
Permission denied (publickey).
And I'm basically not able to successfully access the Github repo.
SSH documentation states:
-A Enables forwarding of the authentication agent connection. This can also be specified on a per-host basis in a configuration file.
How can I specified on a per-host basis in a configuration file?
My local machine runs Mac OSX Mavericks. The VPS runs Ubuntu 12.04
Thanks.