A vim plugin to encrypt and decrypt eyaml.
- hiera-eyaml gem
- a pkcs7_public_key (if using PKCS7 encryption)
- a pkcs7_private_key (optional, only required for decryption)
- Your gpg keys you'll be encrypting/decrypting with
- hiera-eyaml-gpg gem (if using gpg encryption)
Install using your favourite vim plugin manager such as vundle:
~/.vimrc
Plugin 'davewongillies/vim-eyaml'
If you're using PKCS7 encryption, configure ~/.eyaml/config.yaml
with the path to the pkcs7 keys
~/.eyaml/config.yaml
---
encrypt_method: pkcs7
pkcs7_private_key: '~/.eyaml/keys/private_key.pkcs7.pem'
pkcs7_public_key: '~/.eyaml/keys/public_key.pkcs7.pem'
If you're using GPG encryption, set encrypt_method
to gpg
:
~/.eyaml/config.yaml
---
encrypt_method: gpg
or in ~/.vimrc
let g:eyaml_encryption_method: 'gpg'
If you do not have a web of trust (i.e. you normally use --always-trust for gpg signing) then you'll need to g:eyaml_gpg_always_trust
to 1
.
let g:eyaml_gpg_always_trust = 1
By default if you don't set g:eyaml_gpg_recipients
or g:eyaml_gpg_recipients_file
, the plugin will search for the recipients file hiera-eyaml-gpg.recipients
in the current directory, then will search downwards until it finds the file.
" Set one or the other, not both
let g:eyaml_gpg_recipients = 'someguy@gmail.com'
" let g:eyaml_gpg_recipients_file = 'hiera-eyaml-gpg.recipients'
Use vim visual to select a string and then :EyamlEncrypt
to have it replaced by the eyaml equivalent
Use vim visual to select a string and then :EyamlDecrypt
to have it replaced by the eyaml equivalent
- Jonah Meijers
- Arthur Holstvoog
- David Gillies