diff --git a/packages/cli/src/databases/migrations/common/1711390882123-MoveSshKeysToDatabase.ts b/packages/cli/src/databases/migrations/common/1711390882123-MoveSshKeysToDatabase.ts index b02450b3cc..d875f4c65a 100644 --- a/packages/cli/src/databases/migrations/common/1711390882123-MoveSshKeysToDatabase.ts +++ b/packages/cli/src/databases/migrations/common/1711390882123-MoveSshKeysToDatabase.ts @@ -46,6 +46,11 @@ export class MoveSshKeysToDatabase1711390882123 implements ReversibleMigration { return; } + if (!privateKey) { + logger.error(`[${migrationName}] No private key found, skipping`); + return; + } + const value = JSON.stringify({ encryptedPrivateKey: this.cipher.encrypt(privateKey), publicKey,