Search code examples
gitsshwindows-vistacapistranolinode

I can't deploy to linode using capistrano and git


While trying to deploy with capistrano and git I ran into this error:

    [178.79.133.74] executing command
 ** [178.79.133.74 :: out] Initialized empty Git repository in /var/www/depot31/shared /cached-copy/.git/
 ** [178.79.133.74 :: err] Host key verification failed.
 ** [178.79.133.74 :: err] fatal: The remote end hung up unexpectedly
    command finished in 292ms
failed: "sh -c 'if [ -d /var/www/depot31/shared/cached-copy ]; then cd /var/www/depot31/shared/cached-copy && git fetch  orig
in && git fetch --tags  origin && git reset  --hard aac2d7abf5281d7fb4993e39fc534ba44dd8d240 && git clean  -d -x -f; else git
 clone root@178.79.133.74:git/depot31.git /var/www/depot31/shared/cached-copy && cd /var/www/depot31/shared/cached-copy && git checkout -b deploy   aac2d7abf5281d7fb4993e39fc534ba44dd8d240; fi'" on 178.79.133.74

Any clue about what's causing it please?


Solution

  • The problem is that given that I am trying to deploy in a RVM environment, capistrano is trying to fetch RVM environment variables from my development machine but it can't find them as RVM works only on UNIX-based OS.

    So, in last analysis, the main problem is Windows. I am now switching to a UNIX-based OS.