From 3edd280ea8690f5df357fb03ea8c50359052fe79 Mon Sep 17 00:00:00 2001 From: Mykola Morhun Date: Wed, 18 Mar 2020 13:34:36 +0200 Subject: [PATCH] Fix import of zip project in case the archive is hosted on the same cluster which uses self-signed certificate Signed-off-by: Mykola Morhun --- plugins/workspace-plugin/src/theia-commands.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/workspace-plugin/src/theia-commands.ts b/plugins/workspace-plugin/src/theia-commands.ts index f676ff197c..1730ff5ea9 100644 --- a/plugins/workspace-plugin/src/theia-commands.ts +++ b/plugins/workspace-plugin/src/theia-commands.ts @@ -18,6 +18,7 @@ import { execute } from './exec'; import * as git from './git'; const CHE_TASK_TYPE = 'che'; +const SS_CRT_PATH = '/tmp/che/secret/ca.crt'; /** * Enumeration ID's of ide actions. @@ -204,6 +205,9 @@ export class TheiaImportZipCommand implements TheiaImportCommand { try { // download const wgetArgs = [this.locationURI!, '-O', this.zipfilePath]; + if (fs.existsSync(SS_CRT_PATH)) { + wgetArgs.push(`--ca-certificate=${SS_CRT_PATH}`); + } await execute('wget', wgetArgs); // expand