mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat(core): Add HTTPS protocol support for repository connections (#18250)
Co-authored-by: konstantintieber <konstantin.tieber@n8n.io>
This commit is contained in:
committed by
GitHub
parent
eb389a787b
commit
5c6094dfd7
@@ -126,14 +126,21 @@ export class SourceControlService {
|
||||
|
||||
async disconnect(options: { keepKeyPair?: boolean } = {}) {
|
||||
try {
|
||||
const preferences = this.sourceControlPreferencesService.getPreferences();
|
||||
|
||||
await this.sourceControlPreferencesService.setPreferences({
|
||||
connected: false,
|
||||
branchName: '',
|
||||
connectionType: 'ssh',
|
||||
});
|
||||
await this.sourceControlExportService.deleteRepositoryFolder();
|
||||
if (!options.keepKeyPair) {
|
||||
|
||||
if (preferences.connectionType === 'https') {
|
||||
await this.sourceControlPreferencesService.deleteHttpsCredentials();
|
||||
} else if (!options.keepKeyPair) {
|
||||
await this.sourceControlPreferencesService.deleteKeyPair();
|
||||
}
|
||||
|
||||
this.gitService.resetService();
|
||||
return this.sourceControlPreferencesService.sourceControlPreferences;
|
||||
} catch (error) {
|
||||
@@ -212,6 +219,9 @@ export class SourceControlService {
|
||||
await this.initGitService();
|
||||
}
|
||||
try {
|
||||
const currentBranch = this.sourceControlPreferencesService.getBranchName();
|
||||
await this.gitService.fetch();
|
||||
await this.gitService.setBranch(currentBranch);
|
||||
await this.gitService.resetBranch();
|
||||
await this.gitService.pull();
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user