git-annex/doc/bugs/securehashesonly_conflicts_with_addurl.mdwn
Joey Hess 24ae4b291c
addurl, importfeed: Fix failure when annex.securehashesonly is set
The temporary URL key used for the download, before the real key is
generated, was blocked by annex.securehashesonly.

Fixed by passing the Backend that will be used for the final key into
runTransfer. When a Backend is provided, have preCheckSecureHashes
check that, rather than the key being transferred.

Sponsored-by: unqueued on Patreon
2023-03-27 15:10:46 -04:00

17 lines
905 B
Markdown

Turning on `securehashesonly` seems to disable the `addurl` command:
```console
% git config --get annex.securehashesonly
true
% git annex addurl https://www.gutenberg.org/cache/epub/2591/pg2591-images.html
addurl https://www.gutenberg.org/cache/epub/2591/pg2591-images.html
annex.securehashesonly blocked transfer of URL key
failed
addurl: 1 failed
% git annex addurl https://www.gutenberg.org/cache/epub/2591/pg2591-images.html --relaxed
addurl https://www.gutenberg.org/cache/epub/2591/pg2591-images.html (to www.gutenberg.org_cache_epub_2591_pg2591-images.html) ok
(recording state in git...)
% ls -l www.gutenberg.org_cache_epub_2591_pg2591-images.html
www.gutenberg.org_cache_epub_2591_pg2591-images.html -> .git/annex/objects/gg/kG/URL--https&c%%www.gutenberg.org%cache%epub%2591%pg2591-images.html/URL--https&c%%www.gutenberg.org%cache%epub%2591%pg2591-images.html
> [[fixed|done]] --[[Joey]]