ruby-on-rails - Capistrano Net::SSH::AuthenticationFailed

标签 ruby-on-rails ubuntu deployment capistrano bitbucket

这是我的情况:我有这个我已经“capified”的 rails 应用程序,我正在尝试使用 capistrano 将其部署到我的 Ubuntu 云服务器上。我一直在关注本指南 -> http://robmclarty.com/blog/how-to-deploy-a-rails-4-app-with-git-and-capistrano

当我运行 $ cap production deploy ,上限中止,我得到结果 Net::SSH::AuthenticationFailed .

我的猜测:我的服务器无法访问我的 bitbucket 存储库?

好吧,我已经在我的服务器上生成了一个 ssh key ,在我的 bitbucket 帐户中添加了 key ,还完成了 git ls-remote git@bitbucket.org:my-username/my-repo.git .

那么我在这里错过了什么?

这是我的配置/deploy.rb:https://gist.github.com/anonymous/7707266

最佳答案

所以我的开发计算机无法访问生产服务器。原来我放了​​server "<server-ip>", user: "depoy-user", roles: %w{web app}这行。在 config/deploy.rb 中。将它移动到 config/deploy/production.rb 解决了我的问题。捂脸,到处都是捂脸。

关于ruby-on-rails - Capistrano Net::SSH::AuthenticationFailed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20288969/

相关文章:

deployment - 带有部署/上传功能的 Go (golang) IDE

asp.net - 如何从 TeamCity 预编译 ASP.NET Web 应用程序?

ruby-on-rails - Rails to_json 响应将日期时间转换为 unixtimestamp

c++ - 如何使用 CMake 链接到 Capstone?

Java Web Start 应用无法从快捷方式更新

django - 将 Django 设置传输到环境变量

java - 无法为 JDK 选择主目录,因为 IntelliJ 看不到它?

ruby-on-rails - 使用 OAuth 时 Heroku 上的 SSL 错误

ruby-on-rails - ActionMailer 非 ASCII 字符

ruby-on-rails - 必须调用 "render :layout => false"才能在 Rails 2.3.3 中正确呈现 js.erb 模板