During the Chef setup if you may get an error failed to authenticate with your server looks like,


ERROR: Failed to authenticate to https://hostname.com as user-chef with key
/etc/chef/user-chef.pem
Response: Invalid signature for user or client 'user-chef'


Have to make sure the pem files are copied from Chef Server to Workstation machine,

$ sudo chef-server-ctl user-create USERNAME FIRSTNAME LASTNAME email-id@domain.com 'password' --filename ~/.chef/user-chef.pem

$ sudo chef-server-ctl org-create ORG_NAME "orgname" --association_user USERNAME --filename ~/.chef/org-chef.pem

After that, those *.pem files to the workstation, configure in ruby file config.rb

node_name                'node_name'
client_key               "user-chef.pem"

The value for node_name should be the USERNAME that was created on the Chef server.

Change user-chef.pem under client_key to reflect your .pem file for your user.