使用capifony部署symfony时连接失败

时间:2017-01-05 13:33:39

标签: php symfony ssh capistrano capifony

思考2017年将是一个轻松的一年,我已经陷入困境。 (新年快乐顺便说一句)

我已经在symfony中构建了一个网站,我想部署它。

为此,我使用capifony,这可以使部署过程非常简单。

我的 deploy.rb 有一个标准配置文件。

set :application, "set your application name here"
set :domain,      "ip"
set :user,        "userName"
set :use_sudo,     false
set :deploy_to,   "www/"
set :app_path,    "app"

ssh_options[:keys] = %w(/what/ever/.ssh/id_rsa)

set :repository,  "file://Users/ylamb/Documents/dev/db-yl"
set :deploy_via,  :copy
set :scm,         :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none`

set :model_manager, "doctrine"
# Or: `propel`

role :web,        domain                         # Your HTTP server, Apache/etc
role :app,        domain, :primary => true       # This may be the same as your `Web` server

set  :shared_files,        ["app/config/parameters.yml"]
set  :shared_children,     [app_path + "/logs", web_path + "/uploads"]

set  :use_composer, true
set  :update_vendors, true


set  :keep_releases,  3

task :upload_parameters do
  origin_file = "app/config/parameters.yml"
  destination_file = shared_path + "/app/config/parameters.yml" # Notice the
  shared_path

  try_sudo "mkdir -p #{File.dirname(destination_file)}"
  top.upload(origin_file, destination_file)
end

after "deploy:setup", "upload_parameters"

# Be more verbose by uncommenting the following line
# logger.level = Logger::MAX_LEVEL

现在我运行命令cap deploy:setup

出现下一个错误connection failed for: ip (Net::SSH::ConnectionTimeout: Net::SSH::ConnectionTimeout)

我仔细检查了ip,这是正确的。

我创建了一个ssh访问密钥,我使用ssh密钥中的用户名set :user

所以现在我问,是我还是托管服务提供商?

非常感谢

0 个答案:

没有答案