Search code examples
chef-infraknife

How to add knife.rb into environment variables


I am getting error when i am trying to run knife command

knife client list

WARNING: No knife configuration file found
ERROR: ArgumentError: Cannot sign the request without a client name, check that
:node_name is assigned

If i run knife command from repository directory then it's work.

How i can include path of my knife.rb file into environment variables so that i can run knife commands from any location?


Solution

  • Put your knife config file in ~/.chef/knife.rb instead. That is used as the default if no local file is found.