todo/add option to disable fsck upgradable key warningsgit-annexhttp://git-annex.branchable.com/todo/add_option_to_disable_fsck_upgradable_key_warnings/git-annexikiwiki2021-06-25T17:53:28Zcomment 1http://git-annex.branchable.com/todo/add_option_to_disable_fsck_upgradable_key_warnings/comment_1_f91174aef6f7a5a41fb9b9b54249be1c/joey2020-06-17T01:18:32Z2020-03-09T16:24:11Z
<p>git-annex fsck only displays that warning when annex.securehashesonly=true.
That is not a default setting.</p>
<p>Seems to me, setting that when your repo legitimately uses insecure
hashes will cause other problems, eg git-annex will refuse to transfer
content using insecure hashes since it cannot verify it.
So, you could just unset that.</p>
<p>I suppose, if you've migrated away from those hashes, but still have old
objects using them present in the annex, and turned on
annex.securehashesonly=true, fsck --all will warn about the objects.
If that's the problem, it might make sense to disable the warning for
--all and --key.</p>
migration warning still present after migration http://git-annex.branchable.com/todo/add_option_to_disable_fsck_upgradable_key_warnings/comment_2_eb2a5ee55df954b243bf0ea87801fbce/anatoly.sayenko2021-04-18T09:37:09Z2021-04-18T09:37:09Z
<p>Hi, I'm trying to get rid of that warning by migrating my repo to SHA256E, as the messages during fsck suggest, but right after the migration I still get the warning.
For example:</p>
<pre><code>$ git annex fsck study/sport/kite/kiteboarding_progression_beginner.avi
fsck study/sport/kite/kiteboarding_progression_beginner.avi (checksum...)
study/sport/kite/kiteboarding_progression_beginner.avi: Can be upgraded to an improved key format. You can do so by running: git annex migrate --backend=SHA256E study/sport/kite/kiteboarding_progression_beginner.avi
ok
(recording state in git...)
$ git annex migrate --backend=SHA256E study/sport/kite/kiteboarding_progression_beginner.avi
migrate study/sport/kite/kiteboarding_progression_beginner.avi (checksum...) (checksum...) ok
(recording state in git...)
$ git annex fsck study/sport/kite/kiteboarding_progression_beginner.avi
fsck study/sport/kite/kiteboarding_progression_beginner.avi (checksum...)
study/sport/kite/kiteboarding_progression_beginner.avi: Can be upgraded to an improved key format. You can do so by running: git annex migrate --backend=SHA256E study/sport/kite/kiteboarding_progression_beginner.avi
ok
$ ls -la study/sport/kite/kiteboarding_progression_beginner.avi
lrwxrwxrwx 1 tsayen tsayen 211 Apr 18 11:27 study/sport/kite/kiteboarding_progression_beginner.avi -> ../../../.git/annex/objects/5b6/SHA256E-s1802139648--3d86059c3b74145c7085467ff4661f2ab248daa4a9845ddb9228766dc8f2720e.avi/SHA256E-s1802139648--3d86059c3b74145c7085467ff4661f2ab248daa4a9845ddb9228766dc8f2720e.avi
(recording state in git...)
$ git annex unused
unused . (checking for unused data...) ok
</code></pre>
<p>I've tried squashing the entire history on master to 1 commit, removing all remotes, running <code>git annex forget</code> and rerunnig <code>migrate</code>, but it didn't help.
Could you suggest where should I look for that old key that keeps this message popping up? I have the same situation with all my annex repos.
I'm using version 8.20200226</p>
comment 3http://git-annex.branchable.com/todo/add_option_to_disable_fsck_upgradable_key_warnings/comment_3_3b9f1387cc5de5d0bce5fee5fff91002/joey2021-06-25T17:53:28Z2021-06-25T17:39:41Z
<p>Actually, fsck never warns about upgrading MD5 to any SHA hash.
The message you are seeing is about upgrading something already using
SHA256E to an improved version. The <code>--backend=SHA256E</code> displayed by
git-annex fsck comes from the backend it sees the file is already using.</p>
<p>The most likely reason a SHA256E file would need migration would be if it
has non-alphanumeric characters in its extension. There are some other
historical problems that it migrates to solve as well. A <code>git diff</code> of the
changes that <code>git annex migrate</code> made would tell what it did the migration for.</p>
<p>I don't know why fsck then wants to migrate it again. It only looks at the
file staged in git. When I stage that same symlink here, it does not want
to migrate it.</p>
<p>Since your git-annex version is over a year out of date, upgrading to the
current version and checking if it still has the problem is the first step.</p>
<p>(You also seem to have some unusual configuration of your repository, eg
annex.tune.objecthash1=true and annex.tune.objecthashlower=true ...
is that right?)</p>