用capistrano登录时提示输入用户名和密码
答
你是否已经注释掉从config/deploy.rb
这条线?
# you might need to set this if you aren't seeing password prompts
default_run_options[:pty] = true
答
即使它不直你的问题,我用,我有以下变量deploy.yml文件:
website:
git_user:
passphrase:
server_user:
repository:
在deploy.rb,我说:
require 'yaml'
CAP = YAML.load_file("./config/deploy.yml")
然后我用这种方式:
set :scm_passphrase, CAP["passphrase"]
我没有把我的服务器的密码导致我输入Capistrano请求的密码或我的计算机位于服务器的白名单中,因此部署是直接的。