Errors migrating from legacy to hashed storage

I’m currently trying to migrate a Gitlab 13.12.15 instance to 14.x (omnibus installation) but can’t proceed because the gitlab:storage:migrate_to_hashed task fails for about half of our repositories.

For each failed repository, I find the following sequence of error messages in the sidekiq log:

(INFO) Repository moved from '<group>/<project>' to '@hashed/<hashed_path>' (PROJECT_ID=<nnn>)
(ERROR) Repository <group>/<project> failed to upgrade (PROJECT_ID=<nnn>). There is a problem with encrypted attributes: OpenSSL::Cipher::CipherError
(INFO) Repository moved from '@hashed/<hashed_path>' to '<group>/<project>' (PROJECT_ID=<nnn>)
(WARN) Can't find a repository on either source or target paths for <group>/<project> (ID=<nnn>) ...

Unfortunately I don’t have the first clue as to what the message with the encrypted attributes refers to, nor do I understand what it means by being unable to find a repository on either source or target path. The repo certainly can still be checked out just fine afterwards.

On first glance, I can’t really tell if the failed repos have anything in common either. It’s neither all new or old ones, large or small ones, ones stored in subgroups or what have you. Just seems to be a random selection.

I’d be grateful for any pointers.

Everyone who will came here - check this thread - Fix inconsistent storage migration between legacy/hashed storage ($2039252) · Snippets · GitLab (possible solution for OpenSSL::Cipher - Fix inconsistent storage migration between legacy/hashed storage ($2039252) · Snippets · GitLab)