Reputation: 2783
I'm trying to create an encrypted Data bag to store a Mysql password and followed the instructions here to run this command:
knife data bag create --secret-file /tmp/my_data_bag_key passwords mysql
This returns an error:
Error: "Your private key could not be loaded from /Users/ClientName/.chef/ClientName.pem" Check your configuration file and ensure that your private key is readable
Now there is no .pem file at that location.But do I really need one? For Chef solo? If I do, then how do I create this file?
Upvotes: 3
Views: 1687
Reputation: 2783
The gist of it is that the Opscode links in the original post that point to Encrypted Data Bag creation instructions will not work for Chef-solo. The way to make Encrypted Data Bags work with Chef-solo is described here.
Upvotes: 2
Reputation: 1907
This command works by connecting to a chef server. If you don't have a key, this will fail. However, this knife plugin seems to do what you are looking for:
https://github.com/cparedes/knife-file
N.B., I have not used this plugin, but it looks right to me
Upvotes: 2