Sunday, December 16, 2018

[Solved] ERROR: The data in your request was invalid Response: Field 'metadata.name' invalid

This error occurs when you try to upload the chef cookbook on the chef server using the knife command.

The reason for the error is its missing the metadata.name which is used to identify the name of the cookbook and helps to figure out the compatibility with the chef version that you are running.

To overcome this issue you need to create a metadata.rb file in your recipe and put the following content inside the metadata.rb file

 name ''  
 maintainer 'Ankit' 
 maintainer_email '[email protected]
 license 'All Rights Reserved'  
 description 'Installs/Configures  
 long_description 'Installs/Configures 
 version '0.1.0'  
 chef_version '>= 12.14' if respond_to?(:chef_version)


Post a Comment