无法在厨师中安装食谱

时间:2013-03-04 13:23:24

标签: linux ubuntu chef ubuntu-12.10

我刚开始我的厨师之旅,我有几个ubuntu ec2实例正在运行我已经安装了chef-client并且还配置了节点。我正在尝试运行一个入门烹饪书,我正在关注这个wiki

knife cookbook site install getting-started

但是,当我运行此命令时,我的笔记本电脑在ubuntu 12.10上运行时出现此错误

Installing getting-started to /var/chef/cookbooks
ERROR: The default branch 'master' does not exist
If this is a new git repo, make sure you have at least one commit before installing cookbooks

我只是一个初学者,我无法弄清楚如何在我的所有实例中部署一个简单的食谱。

请帮助我

2 个答案:

答案 0 :(得分:3)

你必须

> git add --all
> git commit -a -m "updates"
> git stash save

你必须查看 https://docs.chef.io/errors.html

答案 1 :(得分:2)

我不得不提交git / var / chef / cookbooks目录,首先添加一个readme.txt文件,这样git repo中就有了一些东西。

之后,运行weblogic的安装

    sudo su -
    cd /var/chef/cookbook
    git init
    echo "New repo!" > readme.txt
    git add readme.txt
    git commit -a -m "initializing repo for chef"
    cd /home/your-username/chef-repo
    knife cookbook site install weblogic
相关问题