【问题标题】:berks install found nothing to rewriteberks install 没有发现要重写的东西
【发布时间】:2014-12-08 08:07:40
【问题描述】:

我使用的是 Windows 7 x64 计算机,安装了 ChefDK 0.3.0-1,还安装了 berkshelf 和综合 gem。我设置了我的 Berksfile 和 metadata.rb 文件

元数据.rb

depends 'users', '~> 1.7'
depends 'sudo', '~> 2.6'

伯克斯文件

cookbook 'users', git: 'https://github.com/sethvargo-cookbooks/users.git', rel: 'cookbooks/users', tag: 'v1.7.0'
cookbook 'sudo', git: 'https://github.com/opscode-cookbooks/sudo.git', rel: 'cookbooks/sudo', tag: 'v2.6.0'

我将系统环境变量中的环境变量设置为:

BERKSHELF_PATH=C:/

但是,当我发出命令时:

> berks install

我收到以下错误:

C:\c\c\cookbook_test> berks install
Resolving cookbook dependencies...
Fetching 'addm_setup' from source at .
Fetching 'sudo' from https://github.com/opscode-cookbooks/sudo.git (at v2.6.0/cookbooks/sudo)
Git error: command `git filter-branch --subdirectory-filter "cookbooks/sudo" --force` failed. If this error persists, try removing the cache directory at 'C:/chef/.cache/git/6f5ef5c786d127e1b549253a13b5d48c181aedeb'.Output from the command:

Found nothing to rewrite

我发现我不能使用 Cygwin Git,要么是因为我不知道要为它配置什么,要么是因为 git-scm 的 Git 到目前为止工作正常。我还使用 Windows 命令提示符来执行这些命令。我不知道从这里做什么,或者这试图告诉我什么。

【问题讨论】:

    标签: ruby windows git chef-infra berkshelf


    【解决方案1】:

    不幸的是,幸运的是,这是一个简单的答案。我收到了问题中列出的错误,因为我有

    rel: 'cookbooks/sudo'
    

    这样做是在寻找一个预先存在的存储库,但它并不存在。所以,一旦我删除了它,食谱就会被下载并包含在内以供使用。

    新的结果是:

    C:\c\c\cookbook_test> berks install
    Resolving cookbook dependencies...
    Fetching 'cookbook_test' from source at .
    Fetching 'sudo' from https://github.com/opscode-cookbooks/sudo.git (at v2.6.0)
    Fetching 'users' from https://github.com/sethvargo-cookbooks/users.git (at v1.7.0)
    Fetching cookbook index from https://supermarket.getchef.com...
    Using cookbook_test (0.1.0) from source at .
    Using sudo (2.6.0) from https://github.com/opscode-cookbooks/sudo.git (at v2.6.0)
    Using users (1.7.0) from https://github.com/sethvargo-cookbooks/users.git (at v1.7.0)
    

    【讨论】:

    • 不完全是,它的作用是在 git 存储库中查找子文件夹。因为这里不是这样,所以不需要。
    猜你喜欢
    • 1970-01-01
    • 2010-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-31
    • 1970-01-01
    • 2015-02-02
    相关资源
    最近更新 更多