使用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
有什么想法吗?
答案 0 :(得分:1)
将高线宝石添加到您的Gemfile:
group :development do
gem 'highline'
end
然后运行:
bundle install
答案 1 :(得分:0)
在config / deploy / production.rb
中添加ns = Pyro4.locateNS()
Pyro4.config.HOST = "192.168.0.199"
uri = daemon.register(VehicleController)
ns.register("client@192.168.0.199:12345", uri)
print "Connection set!"
daemon.requestLoop()
How to prevent Capistrano from displaying password when deploying