簡體   English   中英

如何使用capifony [Net :: SSH :: AuthenticationFailed]將Symfony2.1本地網站部署到遠程服務器?

[英]How to deploy a Symfony2.1 local website to a remote server using capifony [Net::SSH::AuthenticationFailed]?

我在/ 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)

它要求輸入密碼,但我不知道是哪個密碼以及為什么密碼,因為我將我的公鑰添加到了我的Authenticate_keys中的遠程服務器上,並且我沒有為此公鑰設置密碼。

確保您可以使用該密鑰和用戶名me自己通過SSH連接。 如果仍然是相同的問題,則啟用更多詳細輸出並啟用Pseudo Terminal

ssh_options[:verbose] = :debug
default_run_options[:pty] = true

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM