相关疑难解决方法(0)

部署 Rails 应用程序时,Capistrano 3 的 SSH 代理转发不起作用

我的deploy.rb中有以下设置

set :application, 'sample_app'
set :repo_url, 'user@123.45.67.100:/home/user/railsapps/sample_app'
set :deploy_to, '/var/www/sample_app'
set :user, "user"
set :ssh_options, { :forward_agent => true }
Run Code Online (Sandbox Code Playgroud)

和我的部署/生产.rb 文件:

set :stage, :production
server '123.45.67.200', user: 'user', roles: %w{app db web}
Run Code Online (Sandbox Code Playgroud)

当我运行 cap生产部署时出现以下错误:检查

DEBUG [] ssh: connect to host 123.45.67.100 port 22: Connection timed out
DEBUG [] fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing …
Run Code Online (Sandbox Code Playgroud)

ssh capistrano ruby-on-rails ruby-on-rails-4 capistrano3

2
推荐指数
1
解决办法
8440
查看次数