How to prevent Capistrano from displaying password when deploying

ぐ巨炮叔叔 提交于 2019-12-11 14:28:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!