cap 部署:部署 Rails 3 应用程序时似乎不是 git 存储库问题

发布于 2024-12-11 23:30:53 字数 2989 浏览 0 评论 0原文

我在部署 Rails 3 应用程序时遇到一些严重问题。 StackOverflow 上没有帖子回答这个问题。

有人可能遇到过这种情况并且知道如何解决吗?提前致谢。

dev:test me$ cap deploy
  * executing `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "git ls-remote ssh://[email protected]/srv/test master"
[email protected]'s password: 
    command finished in 4102ms
  * executing "git clone --depth 1 ssh://[email protected]/srv/test /srv/test/releases/20111025125230 && cd /srv/test/releases/20111025125230 && git checkout -b deploy eb6e04f696aed7a13ee58633ca68902a010685b0 && git submodule init && git submodule sync && export GIT_RECURSIVE=$([ ! \"`git --version`\" \\< \"git version 1.6.5\" ] && echo --recursive) && git submodule update --init $GIT_RECURSIVE && rm -Rf /srv/test/releases/20111025125230/.git && (echo eb6e04f696aed7a13ee58633ca68902a010685b0 > /srv/test/releases/20111025125230/REVISION)"
    servers: ["myserver.net"]
Password: 
    [myserver.net] executing command
 ** [myserver.net :: out] Initialized empty Git repository in /srv/test/releases/20111025125230/.git/
 ** [myserver.net :: out] [email protected]'s password:
Password: 
 ** [myserver.net :: out]
 ** [myserver.net :: out] fatal: '/srv/test' does not appear to be a git repository
 ** [myserver.net :: out] fatal: The remote end hung up unexpectedly
    command finished in 3930ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /srv/test/releases/20111025125230; true"
    servers: ["myserver.net"]
    [myserver.net] executing command
    command finished in 920ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell '@global' -c 'git clone --depth 1 ssh://[email protected]/srv/test /srv/test/releases/20111025125230 && cd /srv/test/releases/20111025125230 && git checkout -b deploy eb6e04f696aed7a13ee58633ca68902a010685b0 && git submodule init && git submodule sync && export GIT_RECURSIVE=$([ ! \"`git --version`\" \\< \"git version 1.6.5\" ] && echo --recursive) && git submodule update --init $GIT_RECURSIVE && rm -Rf /srv/test/releases/20111025125230/.git && (echo eb6e04f696aed7a13ee58633ca68902a010685b0 > /srv/test/releases/20111025125230/REVISION)'" on myserver.net
dev:test me$ 

I have some serious issues deploying my rails 3 app.
There isn't a post on StackOverflow with an answer to this issue.

Anyone might have happened this to them and knows how to fix? Thanks in advance.

dev:test me$ cap deploy
  * executing `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "git ls-remote ssh://[email protected]/srv/test master"
[email protected]'s password: 
    command finished in 4102ms
  * executing "git clone --depth 1 ssh://[email protected]/srv/test /srv/test/releases/20111025125230 && cd /srv/test/releases/20111025125230 && git checkout -b deploy eb6e04f696aed7a13ee58633ca68902a010685b0 && git submodule init && git submodule sync && export GIT_RECURSIVE=$([ ! \"`git --version`\" \\< \"git version 1.6.5\" ] && echo --recursive) && git submodule update --init $GIT_RECURSIVE && rm -Rf /srv/test/releases/20111025125230/.git && (echo eb6e04f696aed7a13ee58633ca68902a010685b0 > /srv/test/releases/20111025125230/REVISION)"
    servers: ["myserver.net"]
Password: 
    [myserver.net] executing command
 ** [myserver.net :: out] Initialized empty Git repository in /srv/test/releases/20111025125230/.git/
 ** [myserver.net :: out] [email protected]'s password:
Password: 
 ** [myserver.net :: out]
 ** [myserver.net :: out] fatal: '/srv/test' does not appear to be a git repository
 ** [myserver.net :: out] fatal: The remote end hung up unexpectedly
    command finished in 3930ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /srv/test/releases/20111025125230; true"
    servers: ["myserver.net"]
    [myserver.net] executing command
    command finished in 920ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell '@global' -c 'git clone --depth 1 ssh://[email protected]/srv/test /srv/test/releases/20111025125230 && cd /srv/test/releases/20111025125230 && git checkout -b deploy eb6e04f696aed7a13ee58633ca68902a010685b0 && git submodule init && git submodule sync && export GIT_RECURSIVE=$([ ! \"`git --version`\" \\< \"git version 1.6.5\" ] && echo --recursive) && git submodule update --init $GIT_RECURSIVE && rm -Rf /srv/test/releases/20111025125230/.git && (echo eb6e04f696aed7a13ee58633ca68902a010685b0 > /srv/test/releases/20111025125230/REVISION)'" on myserver.net
dev:test me$ 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无边思念无边月 2024-12-18 23:30:53

该错误表示路径 ssh://[email protected] /srv/test 不是 git 存储库。

确保路径正确。登录 myserver.net 服务器,cd 到 /srv/test 并验证该文件夹的内容。然后相应地更改 deploy.rb 文件。

The error means the path ssh://[email protected]/srv/test is not a git repository.

Make sure the path is correct. Login into myserver.net server, cd to /srv/test and verify the content of that folder. Then change the deploy.rb file accordingly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文