【问题标题】:Capistrano v3 deploy failed on git rev-parse --short HEADCapistrano v3 部署在 git rev-parse --short HEAD 上失败
【发布时间】:2014-03-21 14:48:45
【问题描述】:

您好,这是我使用 Capistrano 3 和 Rails 4 应用程序部署到 Webfaction 服务器时出现的错误。

The deploy has failed with an error: #<SSHKit::Command::Failed: cd 
/home/username/webapps/app/repo && git rev-parse --short HEAD stdout: Nothing written
cd /home/username/webapps/app/repo && git rev-parse --short HEAD stderr: Nothing written>

我的 git 存储库在 webfaction 内部,我将它创建为 --bare 存储库,不知道这是否会改变。我在 capistrano 文件中设置了这样的 URL:

set :repo_url, '/home/username/webapps/git_app/repos/myrepo.git'

您可能需要的任何其他信息,请询问

谢谢。

【问题讨论】:

  • 在服务器上运行cd /home/username/webapps/app/repo &amp;&amp; git rev-parse --short HEAD会发生什么?

标签: ruby-on-rails git webfaction capistrano3


【解决方案1】:

我刚刚用这个程序解决了这个问题,我不相信它是正确的,但它帮助了我:

我从我的仓库复制了所有文件(git 配置文件):/home/username/webapps/git_app/repos/my_git.git/

到 Capistrano 在 Webfaction 中构建的镜像仓库:/home/username/webapps/git_app/repo

像这样:

cp -a /home/username/webapps/git_app/repos/my_git.git/. /home/username/webapps/git_app/repo

【讨论】:

    猜你喜欢
    • 2020-11-23
    • 2017-11-19
    • 2016-12-03
    • 2018-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多