Question

Capistrano et Git ont fonctionné correctement jusqu’à ce que je transfère mon site sur un autre serveur. Ma première tentative de déploiement a mal tourné à cause d'un problème lié aux hôtes connus de SSH.

Même si j'ai réussi à résoudre ce problème, un autre problème a été soulevé et je ne peux plus en déployer:

  * 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

Mon référentiel git semble intact: pourquoi ai-je le message "Besoin d'une seule révision"?

Toute suggestion est grandement appréciée. Merci d'avance!

UPDATE: quelqu'un a suggéré de supprimer le cache distant, comment puis-je procéder?

UPDATE: J'ai renommé la copie partagée / mise en cache en une copie partagée / mise en cache. Ensuite, j'ai créé un dossier vide partagé / mis en cache. Maintenant, je reçois "Pas un dépôt git": http://pastie.org/672254.txt

Était-ce utile?

La solution

Vérifiez vos versions de Git sur le client et sur le serveur. Je parie que vous devez mettre à jour l’un d’eux en 1.6.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top