您的位置:首页 > 其它

capistrano3.4.0部署不能自动登录

2016-03-25 16:12 393 查看
部署的时候发现需要输入服务器密码,不能直接登录

DEBUG [ab5be9b4] Running /usr/bin/env [ -d $HOME/.rbenv/versions/2.3.0 ] on 10.103.xx.xx
DEBUG [05871a47] Running /usr/bin/env [ -d $HOME/.rbenv/versions/2.3.0 ] on 10.103.xx.xx
DEBUG [dd74890c] Running /usr/bin/env [ -d $HOME/.rbenv/versions/2.3.0 ] on 10.103.xx.xx
DEBUG [ab5be9b4] Command: [ -d $HOME/.rbenv/versions/2.3.0 ]
DEBUG [05871a47] Command: [ -d $HOME/.rbenv/versions/2.3.0 ]
DEBUG [dd74890c] Command: [ -d $HOME/.rbenv/versions/2.3.0 ]
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
root@10.103.xx.xx's password:Text will be echoed in the clear. Please install the HighLine or Termios libraries 

to suppress echoed text.
root@10.103.xx.xx's password:Text will be echoed in the clear. Please install the HighLine or Termios libraries

to suppress echoed text.
root@10.103.xx.xx's password:


3.0+版本config/deploy.rb 取消了user的写法

set :user, 'webuser'


需要用这样的写法

set :ssh_options, { user: 'webuser' }

https://github.com/capistrano/capistrano/blob/621985511529893d972e79452ad63eb54430fb4c/lib/capistrano/templates/stage.rb.erb
或者在deploy/production.rb里设置ssh用户名

# server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value
# server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value
# server 'db.example.com', user: 'deploy', roles: %w{db}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: