Hi.
I couldn't find a way to pass the passphrase, required to open the gpg keypair for an encrypted special remote, to "git annex sync --content". I need this for my backup script. Is it possible to use an environment variable or a passphrase file?
Best regards, sfowijowa
Any method that can be used to provide a passphrase to gpg should work.
For example, gpg-agent can cache the passphrase.
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..
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
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.
Another way is the annex.gnupg-options git configuration setting, see git-annex's man page.