【发布时间】:2014-05-23 22:26:41
【问题描述】:
我正在尝试使用 Capistrano 部署 Rails 应用程序,但是当我运行 cap deploy:setup 时,我得到了
连接失败:123.456.789.0:12345(Net::SSH::AuthenticationFailed:用户 deployer@123.456.789.0 的身份验证失败)
无需输入密码。
但是,如果我运行 ssh -p 12345 deployer@123.456.789.0,一切都会按预期运行。
很多人建议不要使用 net-ssh 2.8.0
在我的 Gemfile 中有
gem 'capistrano', '2.15.5'
gem "net-ssh", '2.8.1', :git => "https://github.com/net-ssh/net-ssh"
部署配置文件非常标准,它包括
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
我在这里遗漏了什么吗?可能是什么问题?
谢谢
【问题讨论】:
-
您是否检查过 Gemfile.lock 的内容和
gem list net-ssh的结果,以确保 2.8.0 还没有在某处徘徊? -
您好,也许您可以从 ~/.ssh/known_hosts 中删除此地址,然后重试。另外,您确定您从根会话中创建了用户“部署者”吗?