質問

CapistranoとGitは、サイトを別のサーバーに移動するまで適切に機能しました。 SSH-known-hostsに関連する問題が原因で、最初にデプロイしようとして失敗しました。

この問題を解決できたとしても、別の問題が発生し、これ以上デプロイできません:

  * executing `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    updating the cached checkout on all servers
    executing locally: "git ls-remote collimarco@mywebsite.com:/home/collimarco/git/foto-fiori.git master"
  * executing "if [ -d /home/collimarco/mywebsite.com/shared/cached-copy ]; then cd /home/collimarco/mywebsite.com/shared/cached-copy && git fetch  origin && git reset  --hard 7de27a6a1de7a94508f943596413e5e0f217f57e; else git clone  --depth 1 collimarco@mywebsite.com:/home/collimarco/git/foto-fiori.git /home/collimarco/mywebsite.com/shared/cached-copy && cd /home/collimarco/mywebsite.com/shared/cached-copy && git checkout  -b deploy 7de27a6a1de7a94508f943596413e5e0f217f57e; fi"
    servers: ["mywebsite.com"]
    [mywebsite.com] executing command
 ** [mywebsite.com :: out] * refusing to create funny ref 'remotes/origin/*' locally
 ** [mywebsite.com :: out] collimarco@mywebsite.com's password:
Password: 
 ** [mywebsite.com :: out]
 ** [mywebsite.com :: out] fatal: Needed a single revision
    command finished
*** [deploy:update_code] rolling back
  * executing "rm -rf /home/collimarco/mywebsite.com/releases/20091027191027; true"
    servers: ["mywebsite.com"]
    [mywebsite.com] executing command
    command finished
failed: "sh -c \"if [ -d /home/collimarco/mywebsite.com/shared/cached-copy ]; then cd /home/collimarco/mywebsite.com/shared/cached-copy && git fetch  origin && git reset  --hard 7de27a6a1de7a94508f943596413e5e0f217f57e; else git clone  --depth 1 collimarco@mywebsite.com:/home/collimarco/git/foto-fiori.git /home/collimarco/mywebsite.com/shared/cached-copy && cd /home/collimarco/mywebsite.com/shared/cached-copy && git checkout  -b deploy 7de27a6a1de7a94508f943596413e5e0f217f57e; fi\"" on mywebsite.com

私のgitリポジトリは無傷のようです:なぜ「単一のリビジョンが必要」となるのですか?

ご提案は大歓迎です。 事前に感謝します!

更新:誰かがリモートキャッシュを削除することを提案しましたが、どうすればよいですか?

UPDATE:shared / cached-copyの名前をshared / cached-copy-oldに変更しました。 次に、共有/キャッシュコピーの空のフォルダーを作成しました。 今、私は「gitリポジトリではない」を取得します: http://pastie.org/672254.txt

役に立ちましたか?

解決

クライアントとサーバーのgitバージョンを確認してください。そのうちの1つを1.6に更新する必要があります。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top