Skip to content

davewongillies/vim-eyaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-eyaml

A vim plugin to encrypt and decrypt eyaml.

Requirements

Optional for pkcs7 encryption

  • a pkcs7_public_key (if using PKCS7 encryption)
  • a pkcs7_private_key (optional, only required for decryption)

Optional for GPG encryption

  • Your gpg keys you'll be encrypting/decrypting with
  • hiera-eyaml-gpg gem (if using gpg encryption)

Installation

Install using your favourite vim plugin manager such as vundle: ~/.vimrc

Plugin 'davewongillies/vim-eyaml'

PKCS7 encryption

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'

GPG encryption

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'

Usage

To Encrypt

Use vim visual to select a string and then :EyamlEncrypt to have it replaced by the eyaml equivalent

To Decrypt

Use vim visual to select a string and then :EyamlDecrypt to have it replaced by the eyaml equivalent

Authors & Contributors

  • Jonah Meijers
  • Arthur Holstvoog
  • David Gillies

About

A vim plugin to encrypt and decrypt hiera-eyaml

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published