2014-01-29 32 views
7

當我運行一個cap <stage> deploy --trace我:Capistrano的停在混帳:檢查

> $ bundle exec cap production deploy --trace 
** Invoke production (first_time) 
** Execute production 
** Invoke load:defaults (first_time) 
** Execute load:defaults 
** Invoke rbenv:validate (first_time) 
** Execute rbenv:validate 
** Invoke rbenv:map_bins (first_time) 
** Execute rbenv:map_bins 
** Invoke bundler:map_bins (first_time) 
** Execute bundler:map_bins 
** Invoke deploy (first_time) 
** Execute deploy 
** Invoke deploy:starting (first_time) 
** Invoke deploy:set_shared_assets (first_time) 
** Execute deploy:set_shared_assets 
** Execute deploy:starting 
** Invoke deploy:check (first_time) 
** Execute deploy:check 
** Invoke git:check (first_time) 
** Invoke git:wrapper (first_time) 
** Execute git:wrapper 
INFO [d204de77] Running /usr/bin/env mkdir -p /tmp/control-panel/ on 10.0.1.6 
INFO [d204de77] Finished in 0.274 seconds with exit status 0 (successful). 
INFO Uploading /tmp/prey-control-panel/git-ssh.sh 100.0% 
INFO [a9e748c9] Running /usr/bin/env chmod +x /tmp/control-panel/git-ssh.sh on 10.0.1.6 
INFO [a9e748c9] Finished in 0.274 seconds with exit status 0 (successful). 
** Execute git:check 

它就停在那裏。我認爲問題與我的其他公鑰有關。我以DevOps的身份工作,我經常使用大約5個不同的密鑰。

任何想法?我應該刪除所有的密鑰還是其他? :)

謝謝。

+0

很難說沒有看到git的源代碼:check capistrano task。你能發佈全部或部分代碼嗎? –

+0

@GregBurghardt這是git:check任務http://pastebin.com/3tCpk7jb –

+2

你能從命令行運行'git ls-remote repo_url'嗎?如果該命令在生產服務器上運行,您是否可以登錄到服務器並運行該命令? –

回答

1

我有一個類似的問題,事實證明,我需要從我的服務器添加SSH密鑰到Bitbucket。奇怪的是,它一直在努力工作,而不必這樣做。

5

我解決了刪除並再次添加我的ssh密鑰的問題。看起來我的密碼太多我的ssh代理...

ssh-add -D ; ssh-add ~/.ssh/id_rsa 
0

我的問題是,我沒有安裝在服務器上的git。我通過將日誌級別設置爲在deploy.rb中進行調試來發現此問題。

0

它可能是你的Gemlock更新但不推動。嘗試更新capistrano gem並推送到git repo,然後再次嘗試部署。