【问题标题】:How do I suppress password from displaying in the clear with Capistrano?如何使用 Capistrano 禁止密码明文显示?
【发布时间】:2016-10-19 20:48:35
【问题描述】:

在使用 Capistrano 时,如何禁止我的密码明文显示?我在 Mac El Capitan 上使用 Rails 4.2.7。消息说要安装 Highline gem,我这样做了,但这并没有阻止密码出现……

localhost:myproject davea$ sudo gem install highline
Successfully installed highline-1.7.8
Parsing documentation for highline-1.7.8
Done installing documentation for highline after 0 seconds
1 gem installed
localhost:myproject davea$ cap production deploy:initial
Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
myser@12.12.12.12’s password:asdf

有什么想法吗?

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-4 rubygems capistrano


    【解决方案1】:

    将高线 gem 添加到您的 Gemfile:

    group :development do
      gem 'highline'
    end
    

    然后运行:

    bundle install
    

    【讨论】:

      【解决方案2】:

      在 config/deploy/production.rb 中添加这个

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

      How to prevent Capistrano from displaying password when deploying

      【讨论】:

        猜你喜欢
        • 2012-05-17
        • 2011-09-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-12-17
        • 1970-01-01
        相关资源
        最近更新 更多