intercity / chef-repo

Set up your server to host Ruby on Rails apps. - Follow us on Twitter: @intercityup
MIT License
417 stars 84 forks source link

Deploy still asking for password #161

Closed cvandermeer closed 9 years ago

cvandermeer commented 9 years ago

I have set up the node.js and followed all the steps in the readme. But when i run cap production deploy:check it still asks me for a deploy password. Is this a problem with the ssh in the node? I used the key that i have generated one from my vps. Any idea what might cause it? Is there a more detailed guide on how to set this up?

michiels commented 9 years ago

Hi!

Can you past the part of the Capistrano log that errors? Then we can take a look at it. From what location are you running "cap deploy:check"? Is the key from that location added to the server's JSON configuration?

We're working to bring our documentation back. But also a good thing to add this to the README.

cvandermeer commented 9 years ago

i am running cap production deploy:check from my the folder of the project that i want to deploy. The key from that projects github is added to the json configuration.

[[user]]@[[computer]]:~/Projects/[appname] $ bundle exec cap production deploy:check INFO [2cf820ae] Running /usr/bin/env mkdir -p /tmp/stageapp/ as deploy@[[serverip]] DEBUG [2cf820ae] Command: ( PATH=/opt/rbenv/shims:$PATH /usr/bin/env mkdir -p /tmp/stageapp/ ) Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text. deploy@188.166.15.123's password:

michiels commented 9 years ago

Okay, thanks for the details.

Just to be sure. On the computer or VPS that you run this command. Did you copy that ~/.ssh/id_rsa.pub key into the configuration key of your server.json configuration file?

So for example, on my own laptop I have this in ~/.ssh/id_rsa.pub:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCuiCTIYcGAbNemW4e1Q0SqfweN2d1Tkhn6xtwiV6/AITgSaW5bFWo/VEUghlCYwYcBgxoOMy0jfUJLS/XG/nQUsL3MKI/oAoFiaVoyDPb/zPvYeWrp3eGi+Ey66luVEVWLdHe1RQqCA52j5mSSCYsjKWt+q8eZWADASyuBsrIZjkdQ8z3ziSeaJdTXPKBKyMPAHd26JFZoBQL39OYcq6xozM7B+IlBoLJhFQRZP1IFjWJYtdYTj2PoByDynfZKltWgS/ouDNIzPhF9ZubXSrwYR4uCXmQbdk+quBItw/RJW7rIlLua24yhoPA/STNel/8Ld33FhMV8D0bx6mj+BrqV michiel@MacBook-Air-van-Michiel.local

This is my SSH key.

And I placed this inside the ssh_deploy_keys configuration in my nodes/188.166.15.123.json:

{
  # ... other options
  "ssh_deploy_keys": [
    "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCuiCTIYcGAbNemW4e1Q0SqfweN2d1Tkhn6xtwiV6/AITgSaW5bFWo/VEUghlCYwYcBgxoOMy0jfUJLS/XG/nQUsL3MKI/oAoFiaVoyDPb/zPvYeWrp3eGi+Ey66luVEVWLdHe1RQqCA52j5mSSCYsjKWt+q8eZWADASyuBsrIZjkdQ8z3ziSeaJdTXPKBKyMPAHd26JFZoBQL39OYcq6xozM7B+IlBoLJhFQRZP1IFjWJYtdYTj2PoByDynfZKltWgS/ouDNIzPhF9ZubXSrwYR4uCXmQbdk+quBItw/RJW7rIlLua24yhoPA/STNel/8Ld33FhMV8D0bx6mj+BrqV michiel@MacBook-Air-van-Michiel.local"
  ],
  # other options
}
cvandermeer commented 9 years ago

Alright that seemed to be the problem. I used the ssh that i generated on the server instead of the computer that i was working on. Thanks for commenting!

michiels commented 9 years ago

Ok! Good to hear that solved it :) Let us know if you have any other questions and open a new issue for those.

Many thanks! Michiel