首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >cloudControl推送拒绝:无法统计文件

cloudControl推送拒绝:无法统计文件
EN

Stack Overflow用户
提问于 2014-11-19 05:00:02
回答 1查看 115关注 0票数 0

我试图将我的应用程序推送到cloudControl,但是它似乎没有正确地运行构建过程,并且一直拒绝我的推送。

以下是错误:

代码语言:javascript
复制
C:\Users\Vincent\Documents\GitHub\***>cctrlapp *** push
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (10/10), 4.06 KiB | 0 bytes/s, done.
Total 10 (delta 1), reused 0 (delta 0)
remote:
remote: -----> Receiving push
remote:        Loading composer repositories with package information
remote:        Installing dependencies (including require-dev) from lock file
remote:          - Installing doctrine/lexer (v1.0)
remote:            Downloading: 100%
remote:
remote:          - Installing respect/validation (0.6.1)
remote:            Downloading: 100%
remote:
remote:          - Installing slim/slim (2.4.3)
remote:            Downloading: 100%
remote:
remote:          - Installing zendframework/zend-escaper (2.2.6)
remote:            Downloading: 100%
remote:
remote:          - Installing zf1/zend-exception (1.12.8)
remote:            Downloading: 100%
remote:
remote:          - Installing zf1/zend-session (1.12.8)
remote:            Downloading: 100%
remote:
remote:        zf1/zend-session suggests installing zf1/zend-config (Used in special situations or with special adapters)
remote:        zf1/zend-session suggests installing zf1/zend-db (Used in special situations or with special adapters)
remote:        zf1/zend-session suggests installing zf1/zend-loader (Used in special situations or with special adapters)
remote:        Generating autoload files
remote: cp: cannot stat `/srv/tmp/builddir/code/vendor': No such file or directory
remote:  !     cloudControl push rejected, failed to compile php app
remote:  !
remote: error: hook declined to update refs/heads/master
To ssh://***@cloudcontrolled.com/repository.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'ssh://***@cloudcontrolled.com/repository.git'
Command '['C:\\Program Files (x86)\\Git\\cmd\\git.exe', 'push', u'ssh://***@cloudcontrolled.com/repository.git', 'master']' returned non-zero exit status 1

现在,我的项目包含以下文件:

  • /
    • 包括/
      • 供应商/

代码语言:javascript
复制
- .gitignore
- composer.json
- composer.lock
- index.php

如何使正确地“编译”PHP应用程序?

这是我的composer.json文件:

代码语言:javascript
复制
{
    "name": "Hello World",
    "description": "My PHP application",
    "authors": [
        {
            "name": "Vincent",
            "email": " ... @gmail.com"
        }
    ],
    "config": {
        "vendor-dir": "includes/vendor"
    },
    "require": {
        "zendframework/zend-escaper": "2.2.6",
        "respect/validation": "~0.6.1",
        "slim/slim": "~2.4.3",
        "zf1/zend-session": "1.12.8"
    }
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-11-20 10:36:58

这里有三个可能的问题:

  • 目录为空。Git不跟踪空目录,因此即使它确实存在于工作目录中,它也不存在于存储库中。
  • 目录不是空的,而是使用.gitignore忽略的。
  • 作曲家没有在正确的地方寻找vendor的定向玩具。/srv/tmp/builddir/code/vendor将意味着它必须存在于/vendor中,您的是在/includes/vendor中。

实际上,它可能是上述任何一种方法的组合。要想知道,我需要.gitignorecomposer.json的内容。如果我不得不打赌,我的钱将是最后的选择。

要解决空目录问题,请确保您的/.gitignore文件不以任何方式包含/includes/vendor。然后创建一个具有以下内容的/includes/vendor/.gitignore文件:

代码语言:javascript
复制
# Ignore everything in this directory
*
# Except this file
!.gitignore

要修复最新版本,请检查您的composer.json和目标-dir设置。有关详细信息,请参阅作曲家文档

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27009283

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档