我想删除Hosted Chef中的Chef Vault项目,但我没有权限,并且没有其他管理员。
knife vault delete secrets my-secret
ERROR: ChefVault::Exceptions::SecretDecryption: secrets/my-secret
is encrypted for you, but your private key failed to decrypt the
contents. (if you regenerated your client key,
have an administrator of the vault run 'knife vault refresh')
我正在使用托管厨师,我创建了一个项目,然后删除了我用来创建它的客户端密钥 - 因此我没有管理员。没有服务器也有权使用该项目。什么都没有。
未经许可,不会:
在网站上:
如何删除此项?
coderanger建议的答案:
knife vault list
secrets
knife vault show secrets
postfix-auth
# Vault items are just data bag items (two items actually)
# so just delete them via that.
knife data_bag delete secrets postfix-auth -y
Deleted data_bag_item[postfix-auth]
# The second one is the same name but with _keys
# appended and holds the item metadata.
knife data_bag delete secrets postfix-auth_keys -y
Deleted data_bag_item[postfix-auth_keys]
# Just to see I am actually doing something I delete it again
knife data_bag delete secrets postfix-auth_keys -y
ERROR: The object you are looking for could not be found
Response: Cannot load data bag secrets item postfix-auth_keys
# Yes the original delete of postfix-auth_keys did something.
# Lets confirm it ...
# knife vault list now empty!
knife vault list
答案 0 :(得分:1)
Vault项目只是数据包项目(实际上是两项),所以只需通过它删除它们。第二个名称相同,但附加了_keys
并保存项目元数据。