diff --git a/pwm b/pwm
index 7dabd0518acf2c8355a149978078ceb8bacb8e80..d803f3f6722821f6cf7a51d53a9e9877355a18f2 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: