0
這是我第一次嘗試與Capistrano部署Rails應用程序。Capistrano:無法chdir或不是git存檔
當我打電話部署在這裏發生了什麼:遷移:
$ cap deploy:migrations * executing `deploy:migrations' * executing `deploy:update_code' updating the cached checkout on all servers executing locally: "git ls-remote [email protected]:/home/collimarco/git/foto-fiori.git master" [email protected]'s password: * executing "if [ -d /home/collimarco/foto-fiori.com/shared/cached-copy ]; then cd /home/collimarco/foto-fiori.com/shared/cached-copy && git fetch origin && git reset --hard b38d7ae360a23c1660baceef571667b79e19769b && git clean -d -x -f; else git clone --depth 1 [email protected]:/home/collimarco/git/foto-fiori.git /home/collimarco/foto-fiori.com/shared/cached-copy && cd /home/collimarco/foto-fiori.com/shared/cached-copy && git checkout -b deploy b38d7ae360a23c1660baceef571667b79e19769b; fi" servers: ["foto-fiori.com"] Password: [foto-fiori.com] executing command ** [foto-fiori.com :: out] Initialized empty Git repository in /mnt/local/home/collimarco/foto-fiori.com/shared/cached-copy/.git/ ** [foto-fiori.com :: out] [email protected]'s password: Password: ** [foto-fiori.com :: out] ** [foto-fiori.com :: out] fatal: '/home/collimarco/git/foto-fiori.git': unable to chdir or not a git archive ** [foto-fiori.com :: out] fatal: The remote end hung up unexpectedly command finished failed: "sh -c 'if [ -d /home/collimarco/foto-fiori.com/shared/cached-copy ]; then cd /home/collimarco/foto-fiori.com/shared/cached-copy && git fetch origin && git reset --hard b38d7ae360a23c1660baceef571667b79e19769b && git clean -d -x -f; else git clone --depth 1 [email protected]:/home/collimarco/git/foto-fiori.git /home/collimarco/foto-fiori.com/shared/cached-copy && cd /home/collimarco/foto-fiori.com/shared/cached-copy && git checkout -b deploy b38d7ae360a23c1660baceef571667b79e19769b; fi'" on foto-fiori.com
/home/collimarco/git/foto-fiori.git所在的目錄,它是一個--bare庫!那麼,問題是什麼?
您是否嘗試過運行capistrano試圖在SSH會話中從服務器運行的命令?特別是,cd /home/collimarco/foto-fiori.com/shared/cached-copy && git fetch origin && git reset --hard b38d7ae360a23c1660baceef571667b79e19769b && git clean -d -x -f; –