From 6b58846d9316bbc2736e3a6e821d1adea00d36d8 Mon Sep 17 00:00:00 2001 From: nobodyinperson Date: Mon, 24 Apr 2023 15:07:28 +0000 Subject: [PATCH] --- ...ryption_bypassed_if_gpg_error_on_init.mdwn | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/bugs/shared_encryption_bypassed_if_gpg_error_on_init.mdwn diff --git a/doc/bugs/shared_encryption_bypassed_if_gpg_error_on_init.mdwn b/doc/bugs/shared_encryption_bypassed_if_gpg_error_on_init.mdwn new file mode 100644 index 0000000000..a4170bec24 --- /dev/null +++ b/doc/bugs/shared_encryption_bypassed_if_gpg_error_on_init.mdwn @@ -0,0 +1,24 @@ +### Please describe the problem. + +When there is a gpg error upon initializing a special remote with shared encryption, the error is effectively skipped and unencrypted content is synced. + +### What steps will reproduce the problem? + +- configure a broken/weird version of gpg (e.g. `git config gpg.program echo` reproduces this but I used the [`ots-git-gpg-wrapper.sh` from OpenTimeStamps](https://github.com/opentimestamps/opentimestamps-client/blob/master/doc/git-integration.md) - that's probably an upstream error but I'd consider a broken gpg not-so-uncommon problem) +- in an annex repo, run `git annex initremote testrepo type=rsync rsyncurl=ssh://... encryption=shared` + - `Not enough bytes returned from gpg [Param "--gen-random",Param "--armor",Param "2",Param "512"] (got 56 ; ex +pected 682 )` + - exits with code 1 + - puts nothing in `git show git-annex:remote.log` but leaves behind a working local git remote that looks to git-annex as an unencrypted remote +- `git annex sync --content` happily syncs unencrypted content + +I guess a sane behaviour would be to not add the local git remote and stop right after encountering the error. + +### What version of git-annex are you using? On what operating system? + +tried with `10.20230329` and `10.20230408+gc70677e31` on Manjaro + + +### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) + +It's awesome 👍