You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using git-annex with encrypted remotes, git will invoke gpg.program for both signing and decryption of remote files. However, ots-git-gpg-wrapper will discard most/all of the arguments.
I believe the intended behavior was probably to loudly discard these arguments, notifying the user that the gpg wrapper is being invoked in an unexpected way. But an even better behavior would be to allow decryption.
To reproduce
gpg-encrypt a file: gpg2 -r 'andrew poelstra' -a -o null.gpg --encrypt /dev/null
Try to decrypt it with the wrapper: ots-git-gpg-wrapper -- --decrypt null.gpg
Try to decrypt with gpg directly: gpg2 --decrypt null.gpg.
You will see that with the wrapper, nothing happens and there is no output. Vs calling gpg2 directly, where the file gets decrypted.
(You probably need to change -r 'andrew poelstra' to your own name, unless you have access to my private keys.)
The text was updated successfully, but these errors were encountered:
I believe there is a way to tell git-annex to use the wrapper for signing while using gpg2 directly for decryption, which would be a fine workaround. Investigating.
When using git-annex with encrypted remotes, git will invoke
gpg.program
for both signing and decryption of remote files. However, ots-git-gpg-wrapper will discard most/all of the arguments.For example, git-annex may invoke the wrapper as
(Here everything after the
--
is provided as$@
inots-git-gpg-wrapper.sh
but for clarity I am ignoring the wrapper script.)However, the gpg wrapper silently discards all options that are unrelated to signing, as you can see here:
opentimestamps-client/otsclient/git_gpg_wrapper.py
Lines 77 to 80 in 6d711ab
I believe the intended behavior was probably to loudly discard these arguments, notifying the user that the gpg wrapper is being invoked in an unexpected way. But an even better behavior would be to allow decryption.
To reproduce
gpg2 -r 'andrew poelstra' -a -o null.gpg --encrypt /dev/null
ots-git-gpg-wrapper -- --decrypt null.gpg
gpg2 --decrypt null.gpg
.You will see that with the wrapper, nothing happens and there is no output. Vs calling gpg2 directly, where the file gets decrypted.
(You probably need to change
-r 'andrew poelstra'
to your own name, unless you have access to my private keys.)The text was updated successfully, but these errors were encountered: