2015-11-12 30 views
1

我最近開始使用Capistrano部署我的rails應用程序,但我似乎無法弄清楚在部署應用程序時如何在顯示密碼時不顯示我的密碼。如何防止Capistrano在部署時顯示密碼

我得到以下警告,

Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.

我安裝了這些寶石,我的密碼仍然以明文形式呼應。任何幫助將不勝感激。

回答

4

添加這個在配置/部署/ production.rb

set :ssh_options, { 
    keys: %w(/Users/artemadamcov/.ssh/id_rsa), 
    forward_agent: true, 
    auth_methods: %w(publickey password), 
    port: 4321 
} 

而在終端

ssh-add ~/.ssh/id_rsa 
+0

進入它,我並不需要指定端口,因爲它是在'生產已指定.rb' – Chris

+2

只是'ssh-add〜/ .ssh/id_rsa'救了我。我應該早點嘗試過你的解決方案...... –