capistrano / rvm

MIT License
140 stars 47 forks source link

Net::SSH::AuthenticationFailed in Execute rvm:hook #80

Closed raidiant closed 8 years ago

raidiant commented 8 years ago

When executing cap production deploy:initial cap aborts in rvm:hook with the error: Net::SSH::AuthenticationFailed: Authentication failed for user user@ipaddress Where user is the deploy user and ipaddress is the ip of my server.

Logging into the server as the user via ssh works.

hieunguyentrung commented 8 years ago

I have this issue too. Did you fix it? Please help me.

raidiant commented 8 years ago

I tried debugging NetSSH but I don't seem to get any further. That, and I've just been on holiday. But I'll try to look into it further this week

hieunguyentrung commented 8 years ago

@raidiant I followed this guild and it works. https://www.sitepoint.com/deploy-your-rails-app-to-aws/

raidiant commented 8 years ago

Fixed it:

You have to add your ssh key to the ssh agent by running ssh-add ~/.ssh/id_rsa or if your ssh key is located somewhere else replace the path with the path to your ssh key. And verify by running ssh-add -l After this every cap command should work as expected.