Error1:
chef (12.17.44)> klam_ssh_conf = Chef::EncryptedDataBagItem.load('hubvpc', 'prod_secrets', IO.read('/etc/chef/hubvpc_prod_key'))['klam'] Chef::EncryptedDataBagItem::DecryptionFailure: Error decrypting data bag value: 'bad decrypt'. Most likely the provided key is incorrect.
issues:
1) encrypted key is wrong.
2) encrypted key is corrupted during copy-paste. (will work with knife though)
=> do a $ cat enc.key | tr -d '\r\n' > enc_new.key
=======================================================================