首页 > 解决方案 > 厨师无法上传

问题描述

我正在学习厨师的基础知识。

基本上我在 Windows 环境中所做的是我在桌面上创建了一个名为 chef

在这个目录中,我有一个名为cookbooks 的文件夹、我的knife.rb 和我的pem 密钥。

在我的食谱中,我做了一个 git clone。

现在在我的目录(C:\Users\adrlee\Desktop\chef)中,我做了一把刀上传食谱 learn_chef_iis。

但是,它给了我一个

错误:在您的菜谱路径中找不到菜谱 learn_chef_iis,跳过它

我的红宝石文件如下:

# See http://docs.chef.io/config_rb_knife.html for more information on knife configuration options

current_dir = File.dirname(__FILE__)
log_level                :info
log_location             STDOUT
node_name                "leexhhadrian"
client_key               "#{current_dir}/leexhhadrian.pem"
chef_server_url          "https://api.chef.io/organizations/chefexampleadrian"
cookbook_path            ["#{current_dir}/../cookbooks"]

我究竟做错了什么?

标签: chef-infra

解决方案


Knife.rb 和 pem 文件应该放在它们自己的子文件夹中,Desktop/chef/.chef/


推荐阅读