This commit is contained in:
nobodyinperson 2023-04-24 15:07:28 +00:00 committed by admin
parent 51df5cb26e
commit 6b58846d93

View file

@ -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 👍