Easy encrypt/decrypt GPG on Ubuntu

Blimey – this was way harder than it should have been…

OK – I just want to be able to quickly encrypt/decrypt passwords – and to be able to encrypt the password using other people’s public GPG keys – should be easy!

First – make sure the keys have been imported OK.  First problem – if you use the standard Seahorse key manager the keys may be imported – but they won’t show.  Use the command line with gpg2 to import the keys – for example:

$ gpg2 –import username_gpg.asc

Import all the keys you want to encrypt/decrypt with.  Ususally this is your own private/public key pair – and the public GPG keys of other users.  Importantly, make sure you can see the keys in Seahorse.

The problem with Seahorse importing keys is logged at https://bugs.launchpad.net/ubuntu/+source/seahorse/+bug/1577198

Now install Geany and its GPG plugin – honestly – it’s the best way – gedit won’t work!

# apt-get install geany geany-plugin-pg

Geany is very lightweight – so it doesn’t feel like its bloating your system up.

Go to Tools – Plugin Manager and enable the GeanyPG plugin.

Then – use an editor to decrypt/encrypt.  The options are under Tools – GeanyPG.


Share Post :