Ar 01/01/2012 am 15:29, ysgrifennodd Lars Wirzenius: > On Sun, Dec 25, 2011 at 09:55:46PM +0000, Dafydd Harries wrote: > > Strane that you get a passphrase dialog, though. That suggests that > > there's something that's different in my environment. It would be good > > to find out what that is. > > I can reproduce this by having "use-agent" in my gpg.conf, and > not running a gpg agent, or not having the GPG_AGENT_INFO environment > variable set (or otherwise arranging so that gpg can't access the > agent). In this case, gpg can't get the passphrase and aborts, > since it's in batch mode. > > I'm using batch mode explicitly to prevent gpg from doing anything > interactive with the user. For now, I could let it do that, but > soon Obnam will be running multiple copies of gpg at the same time, > and then batch mode is required. So I'd prefer to not disable batch > mode right now. > > I could make obnam ask for the gpg passphrase, and provide > that to each gpg invocation. (For obvious reasons, I'd rather not > have it in a configuration file.) Would that be OK with you? > > Are you using a gpg agent? If so, can you figure out why it doesn't > work?
Aha! I am running an agent, and GPG_AGENT_INFO is set, but gpg.conf did not include use-agent. I was confused because other applications (other than the gpg command) were using the agent by default. Setting use-agent means that obnam asks for my passphrase correctly. (It occurs to me that it might make sense for obnam to remember the symmetric key on the run that it generates it, to avoid asking the user for the passphrase to decrypt it. On the other hand, forcing the user to enter their passphrase on the first run might help the user avoid making backups that they can't access.) However, now I get a different error. 2012-01-03 12:59:40 INFO Obnam 0.24 starts 2012-01-03 12:59:40 INFO Backup starts 2012-01-03 12:59:40 INFO Checkpoints every 1073741824 bytes 2012-01-03 12:59:40 DEBUG Exclude pattern: obnam.log 2012-01-03 12:59:40 DEBUG opening repository (create=True) 2012-01-03 12:59:40 INFO VFS: __init__: baseurl=/home/daf/backup 2012-01-03 12:59:55 CRITICAL Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/cliapp/app.py", line 141, in _run self.process_args(args) File "/usr/lib/python2.7/dist-packages/obnamlib/app.py", line 127, in process_args cliapp.Application.process_args(self, args) File "/usr/lib/python2.7/dist-packages/cliapp/app.py", line 318, in process_args method(args[1:]) File "/usr/lib/python2.7/dist-packages/obnamlib/plugins/backup_plugin.py", line 115, in backup self.add_client(client_name) File "/usr/lib/python2.7/dist-packages/obnamlib/plugins/backup_plugin.py", line 142, in add_client self.repo.lock_root() File "/usr/lib/python2.7/dist-packages/obnamlib/repo.py", line 245, in lock_root self._write_format_version(self.format_version) File "/usr/lib/python2.7/dist-packages/obnamlib/repo.py", line 301, in _write_format_version self.hooks.call('repository-toplevel-init', self, 'metadata') File "/usr/lib/python2.7/dist-packages/obnamlib/hooks.py", line 109, in call return self.hooks[name].call_callbacks(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/obnamlib/hooks.py", line 50, in call_callbacks callback(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/obnamlib/plugins/encryption_plugin.py", line 104, in toplevel_init self._write_file(repo, os.path.join(toplevel, 'key'), encrypted) File "/usr/lib/python2.7/dist-packages/obnamlib/plugins/encryption_plugin.py", line 84, in _write_file repo.fs.fs.write_file(pathname, contents) File "/usr/lib/python2.7/dist-packages/obnamlib/vfs_local.py", line 256, in write_file os.remove(tempname) OSError: [Errno 2] No such file or directory: '/home/daf/backup/metadata/tmpCIqJrL' Daf -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org