zoukankan      html  css  js  c++  java
  • 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}
  • 相关阅读:
    微擎 关注发送推荐消息
    修改 processor.php 文件,监听用户对该应用的消息
    微擎返回图文信息
    微擎客服消息发送的函数
    mui 底部导航栏的实现
    两张表的关联查询
    微擎 截取字符串
    webStorm中NodeJs 没有智能提示
    OpenCV 实现自己的线性滤波器
    OpenCV 基本的阈值操作
  • 原文地址:https://www.cnblogs.com/iwangzheng/p/5319916.html
Copyright © 2011-2022 走看看