David Zhang <dzhang21@...> writes:

> 
> 
> I recently moved my ~/.ssh folder contents to my new laptop in the typical 
~/.ssh folder.  I was hoping to be able to use "cap deploy" on my new laptop 
to continue working with a Rails application I already had in production (it's 
the command I'd comfortably use on my old laptop).  A little more background - 
the application is on GitHub, and I've set up the necessary Rails things on my 
new computer.  
> 
> "git push" and "git pull" work fine, but oddly "cap deploy" leads to 
the  "Permission denied (publickey)" error.... which I would think shouldn't 
happen because the ssh keys should be the same.  I can even ssh into the 
server of my app with no problem on my new comp.
> 


I have been tinkering with such things lately, and learning a lot.  There are 
a few things I would check first:

1) Have a look at the contents of your .ssh/id_rsa.pub key.
2) Check your config/deploy.rb script to see which host and user it is using.
3) Shell into the above server and check the users .ssh/authorized_keys file.  
It should contain a line identical to you local id_rsa.pub key.

This will make sure everything between your laptop and the server is set up 
correctly.  Be aware that Capistrano may want to shell to your git repository, 
so ensure the cap user's id_rsa.pub key on the server also apprears in the 
authorised_key file for the git user.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to