forum/Use password protected gpg keypair without password prompt?git-annexhttp://git-annex.branchable.com/forum/Use_password_protected_gpg_keypair_without_password_prompt__63__/git-annexikiwiki2015-07-20T16:32:40Zcomment 1http://git-annex.branchable.com/forum/Use_password_protected_gpg_keypair_without_password_prompt__63__/comment_1_b177f16daeab7f02022f18154cfa1c3c/joey2015-07-15T16:03:37Z2015-07-15T15:55:31Z
<p>Any method that can be used to provide a passphrase to gpg should work.</p>
<p>For example, gpg-agent can cache the passphrase.</p>
<p>Or, you could use gpg's passphrase-file option to make it read the
passphrase from a file. This could be put in ~/.gnupg/gpg.conf.
Although this configuration is probably no more secure than just removing
the passphrase from the gpg key..</p>
comment 2http://git-annex.branchable.com/forum/Use_password_protected_gpg_keypair_without_password_prompt__63__/comment_2_6d88e5a48de78e6add0e4e4b6ebc3f1b/sfowijowa2015-07-17T18:20:06Z2015-07-17T18:20:06Z
<p>Hi, I am using the "--passphrase-file" option outside git-annex to sign the files that have to be backed up:
"gpg --batch --passphrase-file /home/user/.gnupg/pass.txt --no-tty --yes --detach-sign /tmp/root.tar.gz" Unfortunately, I couldn't find a way to pass this option to gpg with git-annex. In duplicity, for example, you can pass gpg options with "dupclitiy --gpg-options '--passphrase-file /home/user/.gnupg/pass.txt'" Best regards</p>
comment 3http://git-annex.branchable.com/forum/Use_password_protected_gpg_keypair_without_password_prompt__63__/comment_3_a2eb4244788eebba5167cd32a73ff204/joey2015-07-20T16:32:40Z2015-07-20T16:30:10Z
<p>I gave you one way in my previous comment; you can put any gpg option in
~/.gnupg/gpg.conf, just leave off the leading dashes.</p>
<p>Another way is the annex.gnupg-options git configuration setting,
see git-annex's man page.</p>