问题
I recently started deploying my rails apps using Capistrano, but I can't seem to figure out how to not display my password when deploying the app when it prompts me for my password.
I get the following warning,
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
I installed both of those gems, and my password is still being echoed in clear text. Any help would greatly be appreciated.
回答1:
Add this in config/deploy/production.rb
set :ssh_options, {
keys: %w(/Users/artemadamcov/.ssh/id_rsa),
forward_agent: true,
auth_methods: %w(publickey password),
port: 4321
}
And enter it in terminal
ssh-add ~/.ssh/id_rsa
来源:https://stackoverflow.com/questions/33665180/how-to-prevent-capistrano-from-displaying-password-when-deploying