jamessan / vim-gnupg

This script implements transparent editing of gpg encrypted files.
http://www.vim.org/scripts/script.php?script_id=3645
724 stars 72 forks source link

Need to type passphrase on every :w ? #118

Closed eater closed 3 years ago

eater commented 3 years ago

My passphrase is cached when I decrypt a .gpg file, but every time I write that file I have to type it in again. Is there any caching possible for encrypting?

jamessan commented 3 years ago

That's entirely up to gpg. The plugin doesn't see your passphrase.

eater commented 3 years ago

I do know that it's up to gpg -- I am just wondering if there is a way to configure gpg for this that I am missing, or whether this is a known inconvenience that I should stop trying to figure out. Thanks.

jamessan commented 3 years ago

If you're using symmetric (passphrase) encryption, no it's not cached. If you're using asymmetric encryption, then gpg-agent/pinentry has a ttl for how long the key is cached.

eater commented 3 years ago

Thanks, that's good to know!