私は 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 コマンド プロンプトを使用してこれらのコマンドを実行しています。ここから何をすればよいのか、これが何を伝えようとしているのかわかりません。