How to use a chef knife without a secret key?

I want to use Chef Knife from the command line for some basic things, such as creating data packets and cookbooks. The problem is that he continues to fail and complains that the secret key is missing.

ERROR: your private key cannot be downloaded from /Users/newuser/.chef/newuser.pem Check the configuration file and make sure your private key is readable

I know that I need a Chef client to have a private key, but I only want to fly solo. Is there a way to make Knife work and not let him complain about the missing secret key?

+6
source share
2 answers

Can you copy the webui pem key from the server?

At the chef it is also a client-chef-client. Webui one is used for. Ui, to make it the rest of the calls, I believe that it is .full admin.

I would emphasize that normal behavior would be setting up the client and loading knives and would not have to impose a lot of overhead, but I think the webui key would work

A .rb knife would look like

log_level :info log_location STDOUT node_name 'chef-webui' client_key 'c:\chef\DEV\webui.pem' validation_client_name 'chef-validator' validation_key 'c:\chef\DEV\validation.pem' chef_server_url 'http://yourserverhere.com:4000' cache_type 'BasicFile' cache_options( :path => 'C:/chef/checksums' ) 
+3
source

Open the file knife.rb and delete / comment on client_key, chef_server_url and any other lines that may be required to connect to the chef server at runtime.

-1
source

All Articles