Editing gpg encrypted text files / 2016-09-04

2016-09-04 Editing gpg encrypted text files11 months ago
For a while I have been using the gnupg.vim plugin but I noticed recently after changing my gnupg configuration to show long IDs that this plugin had problems. I searched and found a new version of the plugin at vim-gnupg/gnupg.vim at master · jamessan/vim-gnupg which does not have this problem.

So now I can simply keep text information in encrypted files and I need to type the passphrase every time I want to edit the file.

The easiest way to create an encrypted file to use with this plugin is create an empty file, encrypt that file from the command line and then edit it with the plugin:
$ touch datafile.txt
$ gpg -e datafile.txt
You did not specify a user ID. (you may use "-r")

Current recipients:
4096g/0xCC166EB91F480E9A 2011-01-11 "Koos van den Hout <koos@kzdoos.xs4all.nl>"

Enter the user ID.  End with an empty line: 
$ ls -l datafile.txt*
-rw-r--r-- 1 koos users    0 Sep  4 20:49 datafile.txt
-rw-r--r-- 1 koos users 1114 Sep  4 20:50 datafile.txt.gpg
$ wipe datafile.txt
Okay to WIPE 1 regular file ? (Yes/No) Yes
Operation finished.                                                           
1 file wiped and 0 special files ignored in 0 directories, 0 symlinks removed but not followed, 0 errors occured.
Now editing the file with vim datafile.txt.gpg goes through decrypting the file before starting the editing session and saves it encrypted when done.

Tags: , ,

, reachable as koos+website@idefix.net. PGP encrypted e-mail preferred.

PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers pgp key statistics for 0x5BA9368BE6F334E4 Koos van den Hout
RSS
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews, Weather maps
This page generated in 0.008790 seconds.