From 1f977907983d5c87bb4a04e7129d3fb2e6d1e075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= <pirkl.theo@gmail.com> Date: Mon, 7 Feb 2022 17:40:05 +0100 Subject: [PATCH] Fixes wrongly formatted HTTPS URL --- pwm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pwm b/pwm index 7dabd05..d803f3f 100755 --- a/pwm +++ b/pwm @@ -207,7 +207,10 @@ def clone_all(token: str, id: str, directory: str, until_date: Optional[str], so print('Cloning in "' + directory + '/' + repo_local_name + '"') if use_http: - url = "{}:{}@{}".format("gitlab-ci-token", token, BASE_URL) + scheme = "https://" + after_https = BASE_URL.find(scheme) + len(scheme) + + url = BASE_URL[:after_https] + "{}:{}@".format("gitlab-ci-token", token) + BASE_URL[after_https:] subprocess.run(["git", "clone", "-q", web_url.replace(BASE_URL, url), directory + '/' + repo_local_name]) else: -- GitLab