Credentials could not be decrypted since 1.75.0 to 1.75.2

I can confirm a workaround in the meantime :

  1. First, run the following script in your db to get a list of all credentials ordered by updatedAt :
SELECT p."name" AS "projectName", c."name" AS "credentialName", c."type", c."createdAt", c."updatedAt", "isManaged"
FROM credentials_entity AS c
JOIN shared_credentials AS sc ON c.id = sc."credentialsId"
JOIN project AS p ON p.id = sc."projectId"
ORDER BY c."updatedAt" DESC
;
  1. Take the oldest one and try this by using the CLI :
n8n export:credentials --id=<id> --decrypted
  1. Delete everyone that result in the following errors :
2025-01-28T08:06:56.562Z | error | Error exporting credentials. See log messages for details. {"file":"credentials.js","function":"catch"}
2025-01-28T08:06:56.563Z | error | Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data. {"file":"credentials.js","function":"catch"}
  1. You should now be able to use the following command and hence your admin account should no longer have any problem :
n8n export:credentials --decrypted --all

Thanks n8n team for the fast reponse to this issue!

1 Like