2013-02-24 104 views
1

我想在我的生產服務器上部署我的bitbucket存儲庫,但無法。當我從我的Git bash執行push pull時,一切正常,但capistrano未能達到相同效果。無法通過capistrano在服務器上部署bitbucket存儲庫

set :application, "my_app" 
    set :user, "username" 
    set :repository, "ssh://[email protected]/accountname/repository.git" 
    role :web, "www.domain.com" 
    set :deploy_to, "/home/domaincom/domain.com" 
    set :use_sudo, false 
    set :scm,  :git 
    set :branch,  'master' 
    set :deploy_via, :copy 
    set :copy_cache, true 
    set :copy_exclude, %w(.git) 


    task :create_symlinks, :roles => :web do 
    run "rm #{current_release}/public/.htaccess" 
    run "ln -s #{current_release}/shared/.htaccess #{current_release}/public/.htaccess" 
    run "ln -s /home/domaincom/libraries/Zend #{current_release}/library/Zend" 
    end 

    after "deploy:finalize_update", :create_symlinks 

我得到的錯誤是這樣的部署

:No such file or directory -git ls-remote   ssh://[email protected]/accountname/repository.git master (Error::ENOENT) 

請幫我,我被困在這過去的4天。嘗試添加部署密鑰。但沒有任何作品

編輯:也請不要在我的生產服務器上安裝Git和Capistrano。我在windows計算機上使用capistrano

+0

你能編輯你的問題,包括capistrano輸出錯誤前後幾行嗎? – 2013-02-24 13:25:07

回答

0

您是否需要生產服務器上的git?

至少錯誤消息看起來像是這個問題。

0

您需要在服務器上安裝git

隨着capistrano,你只需告訴你的服務器(s)執行什麼命令,然後工作就發生在服務器上。而服務器被命令做的其中一件事是使用git克隆/拉你的回購。爲了實現這一點,他們顯然需要安裝git ...

相關問題