1
我在/ Sites/mywebsite中有我的Symfony2.1網站文件夾,裏面有git。 我想用capifony快速部署我的網站到我的遠程服務器(我目前使用的是ftp)。 所以我安裝capifony,並使用capifony .
如何使用capifony [Net :: SSH :: AuthenticationFailed]將Symfony2.1本地網站部署到遠程服務器?
我使用第二個解決方案,描述在這裏我的項目啓動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,我不設置此公鑰的密碼。