How Do You Troubleshoot the Chef Error “Field ‘name” invalid” after Running a chef-server-ctl Command?

Problem scenario
You are trying to create an organization using the chef-server-ctl org-create command.  But you get an error that the "name" entered was invalid.  For example, you run this:

sudo chef-server-ctl org-create ContInt "ContinualIntegration" --association_user contintuser --filename /bin/good.pem

But you get this:

ERROR: The data in your request was invalid
Response: Field 'name' invalid

What should you do?

Solution
For the "shortname" that is immediately after the "org-create" command, make sure it is all lowercase.  Instead of "ContInt", it should be "contint".

Leave a comment

Your email address will not be published. Required fields are marked *