refactor(core): Store SSH key pair for source control in DB settings (#8965)

This commit is contained in:
Iván Ovejero
2024-03-26 19:09:46 +01:00
committed by GitHub
parent 19d9e71cb9
commit ddc0f57116
8 changed files with 201 additions and 33 deletions

View File

@@ -39,6 +39,7 @@ import { ApplicationError } from 'n8n-workflow';
@Service()
export class SourceControlService {
/** Path to SSH private key in filesystem. */
private sshKeyName: string;
private sshFolder: string;
@@ -112,7 +113,7 @@ export class SourceControlService {
});
await this.sourceControlExportService.deleteRepositoryFolder();
if (!options.keepKeyPair) {
await this.sourceControlPreferencesService.deleteKeyPairFiles();
await this.sourceControlPreferencesService.deleteKeyPair();
}
this.gitService.resetService();
return this.sourceControlPreferencesService.sourceControlPreferences;