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
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 firstname.lastname@example.org '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
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.