From 5e9ca672183c8fb44d9fd15ddb2f9d6b7fc03ccb Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Thu, 19 Aug 2021 21:11:59 -0700 Subject: [PATCH] Fixes https://github.com/caprover/caprover/issues/1168 --- src/utils/GitHelper.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/GitHelper.ts b/src/utils/GitHelper.ts index 720a329..0887f36 100644 --- a/src/utils/GitHelper.ts +++ b/src/utils/GitHelper.ts @@ -78,7 +78,10 @@ export default class GitHelper { // Some people put https when they are entering their git information const REPO_PATH = GitHelper.sanitizeRepoPathHttps(repo) - const remote = `https://${USER}:${PASS}@${REPO_PATH}` + // respect the explicit http repo path + const SCHEME = repo.startsWith('http://') ? 'http' : 'https' + + const remote = `${SCHEME}://${USER}:${PASS}@${REPO_PATH}` Logger.dev(`Cloning HTTPS ${remote}`) return git() // .silent(true) //