Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Private key could not be loaded when I run "knife client list"

Configuration file written to /home/ubuntu/sudo /home/ubuntu/chef-repo/.chef/knife.rb

ubuntu@mychefclient:~$ knife client list
WARNING: No knife configuration file found
ERROR: Your private key could not be loaded from /etc/chef/client.pem
Check your configuration file and ensure that your private key is readable
like image 678
Suresh Sala Avatar asked Oct 29 '13 06:10

Suresh Sala


1 Answers

Please check once that the knife.rb file is there in .chef/knife.rb.

If not run the following command:

knife configure initial

so it will create knife.rb, then check the path of client key in knife.rb and cross check whether the client.pem is present on that location.

If this doesn't work.

just go to the client node and delete client.pem from /etc/chef, then run chef-client so it will create client.pem again. Now copy that client.pem on to the server and add that location into the knife.rb

It will work definitely :)

like image 108
Jyoti Amage Avatar answered Oct 10 '22 13:10

Jyoti Amage