capistrano3.4.0部署不能自动登录

部署的时候发现需要输入服务器密码,不能直接登录

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}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值