ugosan / vscode-openpgp

This extensions implements OpenPGP in VSCode, allowing you to encrypt and decrypt files using public and private keys.
3 stars 0 forks source link

Encrypt on save, decrypt on open #9

Open markNZed opened 2 months ago

markNZed commented 2 months ago

I would like to be able to edit a file in VS Code and be sure that it is always encrypted when it is pushed. I'd also like to use my OpenPGP keys and ideally only have to enter the passphrase once per session. This extension seems very close. Maybe this is not possible with VS Code extensions? I found some discussion of this at https://stackoverflow.com/questions/64457293/vscode-decrypt-on-open-encrypt-on-save and that indicates the decrypted file would still be saved to disk for a short time - which is not ideal. There is also a request for "transparent editing" at https://github.com/jvalecillos/vscode-gpg/issues/6 which mentions that "none of the gpg extensions in vscode do this" as of 2021

Is there a way to use the gpg-agent so we do not have to enter the passphrase every time ?

I am not used to using OpenPGP so it took me some time to realize that I needed to generate files and put them into ~/.vscode/openpgp-keys maybe that coud be mentioned in the README

Thanks for your work!

markNZed commented 2 months ago

I ended up using git-crypt which automates the encryption/decryption