【发布时间】:2015-09-15 03:06:02
【问题描述】:
尝试使用 Capistrano 3 部署 rails 应用程序,当我运行此命令时,出现此错误
vagrant@vagrant-ubuntu-utopic-32:/vagrant$ cap production deploy
INFO [e4213f70] Running /usr/bin/env mkdir -p /tmp/career/ on 192.168.51.54
DEBUG [e4213f70] Command: /usr/bin/env mkdir -p /tmp/career/
Text will be echoed in the clear. Please install the HighLine or Termios librari
es to suppress echoed text.
@192.168.51.54's password:secert
@192.168.51.54's password:secert
@192.168.51.54's password:secert
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host 192.168.51.54: A
uthentication failed for user @192.168.51.54
Net::SSH::AuthenticationFailed: Authentication failed for user @192.168.51.54
Tasks: TOP => git:check => git:wrapper
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing on host 192.168.5
1.54: Authentication failed for user @192.168.51.54
我在堆栈溢出中看到了一些帖子 [1,2]。但我仍然收到错误。
这是我的 Capfile:
require 'capistrano/setup'
set :stage, :production
require 'capistrano/deploy'
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
deploy.rb 文件:
lock '3.4.0'
set :application, "career"
set :repo_url, "https://github.com/mezbahalam/offender_profile"
set :user, 'vagrant'
# set :scm_passphrase, "password"
set :deploy_to, "/home/vagrant/apps/career"
set :use_sudo, false
set :scm, :git
server "192.168.51.54", roles: [:app, :web, :db], :primary => true
我做错了什么?
【问题讨论】:
标签: git ruby-on-rails-4 ssh capistrano3