gpt4 book ai didi

git - SSHKit::Runner::ExecuteError:在主机 Net::SSH::AuthenticationFailed 上执行时出现异常:身份验证失败

转载 作者:太空狗 更新时间:2023-10-29 14:45:24 25 4
gpt4 key购买 nike

尝试使用 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 }

部署.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

我做错了什么?

最佳答案

尝试为部署设置 ssh key 。确保您的公钥在服务器上的授权 key 列表中,并且它是 chmod 600。

关于git - SSHKit::Runner::ExecuteError:在主机 Net::SSH::AuthenticationFailed 上执行时出现异常:身份验证失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31102344/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com