Capistrano和Git工作正常,直到我将站点移动到另一台服务器。由于与ssh已知主机相关的问题,我第一次尝试部署时出错。
即使我设法解决了这个问题,另一个问题又出现了,我不能再部署了:
* 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存储库似乎完好无损:为什么我会得到“需要一次修订”?
任何建议都非常感谢。
事先谢谢!
更新:有人建议删除远程缓存,我该怎么做?
更新:我已将共享/缓存副本重命名为共享/缓存副本旧版本。
然后我创建了一个共享/缓存副本空文件夹。
现在我得到“不是Git存储库”:
http://pastie.org/672254.txt