0

I am using Offlineimap with gpgp stored passwords. Pretty similar to this setup

https://unix.stackexchange.com/questions/44214/encrypt-offlineimap-password

My issue is this. I have multiple email accoutns, and it is tedious to enter the same Gnupg password over and over again while trying to sync.

I tried the priming thing the user mentions in that article but it does not work me, in fact OfflineImap tries to pass the actual Gpg password to the mail server. So I assume that is botched.

The other issue is that I cannot use the Gnome Keyring type stuff because I do not have Gnome/Kde etc. I am using ssh terminal for that.

I am on Debian Wheezy 32b, it has Py 2.7

What are my options?

thanks

yarun can
  • 990
  • 2
  • 17
  • 36
  • Are you using one or multiple keys for your mail addresses? If you're using a single key, you should be able to configure `gpg-agent`. If you're using multiple keys, you're probably out of luck. – Jens Erat Jun 01 '14 at 08:30
  • I am using single key however the solution has to be terminal friendly since I cant get gpg-agent window – yarun can Jun 01 '14 at 15:33
  • There is also a (n)curses based implementation, if you can have an interactive terminal (which you seem to have). – Jens Erat Jun 01 '14 at 16:52
  • If the hint on the curses-implementation worked for you, I will reformulate the comment as an answer. – Jens Erat Jun 01 '14 at 17:05
  • Jens thanks for the point, Iactually figured out after you mentioned it. Surprisinglu It works great! – yarun can Jun 04 '14 at 01:51

2 Answers2

1

See the Arch Wiki for configuring gpg-agent

Install gnupg2 & change /usr/bin/gpg to be a symlink to /usr/bin/gpg2 (removing gnupg breaks Debian).

For anyone using duply on Debian Wheezy & having problems with pinentry-curses - use duply 1.9.0 not 1.5.5 in the repos (this fixes problems signing backups with gpg).

pinentry-curses now works without any problems when called programmatically. This also fixes gpg problems with fwknop

Stuart Cardall
  • 316
  • 2
  • 7
0

GnuPG 2 (in Debian and derivatives installed as gpg2) can connect with gpg-agent caching your passphrase. If you use a graphical user interface, you will probably know it from its key entry window, but there's also a command line version pinentry-curses, that does not require any window manager. In Debian and derrivative distributions, it's in the package pinentry-curses:

pinentry-curses - curses-based PIN or pass-phrase entry dialog for GnuPG

Make sure to configure it in .gnupg/gpg-agent.conf.

Jens Erat
  • 17,507
  • 14
  • 61
  • 74