厨师,在您的食谱路径中找不到食谱 [英] chef, Could not find cookbook in your cookbook path
问题描述
在我的厨师仓库中,我添加了一个烹饪书
in my chef-repo I added a cookbook
烹饪书/ mycookbook
我何时做
$ knife cookbook upload mycookbook
我得到
ERROR: Could not find cookbook php-1.3.1 in your cookbook path, skipping it
Uploaded 0 cookbooks.
我在这里做什么错了
推荐答案
A config.rb
文件用于指定刀的配置详细信息,该文件在每次运行刀可执行文件时加载,默认情况下位于〜/ .chef / config.rb
(如果我没记错的话,也可以将其放在厨师库目录中的 .chef / config.rb
中)。
A config.rb
file is used to specify configuration details for knife, which is loaded every time the knife executable is run and is located by default at ~/.chef/config.rb
(and if i am not mistaken, you can also place it within the your chef repository directory at .chef/config.rb
).
确保在 config.rb
cookbook_path
The Chef Infra用于存储食谱的客户端子目录。该值可以是字符串或文件系统位置数组,以指定顺序处理。最后一本菜谱被认为覆盖了本地修改。例如:
The Chef Infra Client sub-directory for storing cookbooks. This value can be a string or an array of file system locations, processed in the specified order. The last cookbook is considered to override local modifications. For example:
cookbook_path [
'/var/chef/cookbooks',
'/var/chef/site-cookbooks'
]
这篇关于厨师,在您的食谱路径中找不到食谱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!