Search code examples
chef-infracookbook

Chef Cookbook upload


I am trying to upload a specific cookbook from my local machine to my chef org but I am receiving the following error:

pwd:  /c/Users/z068688/sharaj_repo/sensu_cookbooks/cookbooks

$ knife upload certs_tgt -c C:/Users/z068688/.chef/knife_flex_plm.rb
ERROR: Attempt to use relative path 'certs_tgt' when current directory is outside the repository path.
ERROR: Current working directory is 'C:/Users/z068688/sharaj_repo/sensu_cookbooks/cookbooks'.

Solution

  • Using -o parameter when upload cookbook to Chef-server.

    knife cookbook upload cookbook_name -o /c/Users/z068688/sharaj_repo/sensu_cookbooks/cookbooks