Getting stuck with CipherError during migration

We are in the process of migrating to a 14.x version of a self-hosted Gitlab CE.

We are however stuck at 13.12.15. We are running into pretty much exactly this problem, which occurs after triggering the migration via

gitlab-rake gitlab:storage:migrate_to_hashed

Just to make this clear: The vast majority of the migration jobs succeed, there are however some few projects which are in an awkward state due to a full hard disk late last year. Specifically, these projects do not have an associated repository (they are probably read-only because they could not be properly created).

As was suggested in the issue, we tried to remove the repository_read_only flag. However, every time we try we get a CipherError thrown back at us.

Similarly, we cannot move / delete / update the relevant projects from the web interface. We get a 500 error back, the logs also showing a cipher error. It is however possible to move / delete / update all other normal projects, so the CipherError appears to be somehow related to the specific projects.

In order to fix the CipherError it was suggested to remove the runners_registration_token_encrypted from the application settings. However, this did not help us. Similarly, deleting the encrypted_ci_jwt_signing_key as suggested here did not change everything after restarting gitlab.

Does anyone have an idea on how to fix this situation? We would be happy to delete the awkward projects if that helped, but this appears to be impossible…