Deployment and apt-get password
|
|
I am deploying my application with the Brightbox gem 2.3.6. The server has a copy of my public SSL key, so “cap deploy” doesn’t constantly ask for the server password. Unfortunately, the “apt-get update” command is still asking for the password during deployment, despite the public key:
This gets quite annoying after a while, as it disrupts the otherwise fully automated deployment process. Is there a way to make “sudo apt-get” use the ssl key instead, or to disable this command altogether? |
|
|
Hi, the password is needed to run sudo commands and sudo doesn’t support ssh keys. You can tell Capistrano the password in the recipe though, and it’ll enter it for you whenever it’s needed: set :password, “mysecrets” we do recommend keeping this out of your code repository though – see the advanced gem settings page on the wiki for example of how to do this: http://wiki.brightbox.co.uk/docs:gemv2:advanced… John. |