如何使用capifony [Net :: SSH :: AuthenticationFailed]将Symfony2.1本地网站部署到远程服务器?

时间:2013-03-19 09:22:40

标签: symfony deployment capistrano capifony

我在/ Sites / mywebsite中有我的Symfony2.1网站文件夹,里面有git。 我想使用capifony将我的网站快速部署到我的远程服务器(我目前正在使用ftp)。 所以我安装了capifony,并使用capifony .

在我的项目中启动了capifony

我使用第二个解决方案来描述http://capifony.org/(部署 - >生产通过副本),所以我设置了我的deploy.rb文件:

set :application, "mywebsite"
set :domain,      "199.178.832.3:8534"
set :deploy_to,   "git/mywebsite.git"
set :app_path,    "app"

set :repository,  "file:///Users/me/Sites/mywebsite"
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                         # This may be the same as your `Web` server
role :db,         domain, :primary => true       # This is where Symfony2 migrations will run

set :use_composer, true

set :use_sudo,      false
set :keep_releases,  3
set :shared_files,      ["app/config/parameters.yml"]
set :shared_children,   [app_path + "/logs", web_path + "/uploads", "vendor"]

set :deploy_via, :rsync_with_remote_cache
ssh_options[:forward_agent] = true
ssh_options[:keys] = ["~/.ssh/id_rsa"]

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

但是当我运行cap deploy:setup时,出现以下错误:

  * 2013-03-19 10:52:06 executing `deploy:setup'
  * executing "mkdir -p git/mywebsite.git git/mywebsite.git/releases git/mywebsite.git/shared"
    servers: ["199.178.832.3"]
Password: 
connection failed for: 199.178.832.3:8534 (Net::SSH::AuthenticationFailed: me)

它要求输入密码,我不明白哪一个以及为什么,因为我在authorized_keys中将我的公钥添加到我的远程服务器,而且我没有为这个公钥设置密码。

1 个答案:

答案 0 :(得分:0)

确保您可以使用该密钥和用户名me自行通过SSH进行连接。如果问题仍然存在,请启用更详细的输出并启用Pseudo Terminal

ssh_options[:verbose] = :debug
default_run_options[:pty] = true
相关问题