0

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'.
Pavel Vladov
  • 4,707
  • 3
  • 35
  • 39

1 Answers1

0

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

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

Tensibai
  • 15,557
  • 1
  • 37
  • 57
Thanh Nguyen Van
  • 10,292
  • 6
  • 35
  • 53
  • Worth giving a description of what `-o` does...(and that it should be used when not working in the cookbook_path defined in knife configuration). [Documentation on knife.rb](https://docs.chef.io/config_rb_knife.html) and on [knife cookbook upload](https://docs.chef.io/knife_cookbook.html#upload) – Tensibai Jun 15 '16 at 08:59