0
votes

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'.
1
You shoud cd to C:/Users/z068688/sharaj_repo/ then upload. - Thanh Nguyen Van
Same error again! DHC+z068688@1ZLYGZ1 MINGW64 /c/Users/z068688/sharaj_repo $ 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'. DHC+z068688@1ZLYGZ1 MINGW64 /c/Users/z068688/sharaj_repo - Sharaj Alva
Check your knife_flex_plm.rb file for the "cookbook_path" parameter, or use -o . in your command line. - Tensibai
knife cookbook upload cookbook_name -o /c/Users/z068688/sharaj_repo/sensu_cookbooks/cookbooks - Thanh Nguyen Van
That worked!!! Thank you very much! - Sharaj Alva

1 Answers

0
votes

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

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