0

私は Windows 7 x64 コンピューターを使用しており、ChefDK 0.3.0-1 がインストールされ、berkshelf と omnibus 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 コマンド プロンプトを使用してこれらのコマンドを実行しています。ここから何をすればよいのか、これが何を伝えようとしているのかわかりません。

4

1 に答える 1

0

残念ながら、そして幸いなことに、これは単純な答えでした。質問に記載されているエラーを受け取っていたのは、

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)
于 2014-10-13T18:31:52.067 に答える