chef-infrachefdk

chef provision command fails because of missing node name


I am trying to use "chef provision", which is part of the ChefDK. I have been trying to follow this article but I encounter an error when running the "chef provision" command.

http://jtimberman.housepub.org/blog/2015/05/15/quick-tip-chefdk-provision/

What am I missing? Any pointers are much appreciated!

$ chef provision testing --sync -n mymachinename
Uploading policy to policy group testing
Error: Failed to upload policy to policy group testing
Reason: (ArgumentError) Cannot sign the request without a client name, check that :node_name is assigned

Solution

  • The most likely cause of the message

    Reason: (ArgumentError) Cannot sign the request without a client name, check that :node_name is assigned

    is that you have not yet configured the connection to your Chef Server. Check that there is a knife.rb at one of the expected locations and that it defines a node_name.