How to prevent Capistrano from displaying password

2019-08-10 07:22发布

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条回答
叛逆
2楼-- · 2019-08-10 08:13

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
查看更多
登录 后发表回答