Skip to content
Snippets Groups Projects
Verified Commit 1f977907 authored by Théo Pirkl's avatar Théo Pirkl :nail_care:
Browse files

Fixes wrongly formatted HTTPS URL

parent 20ed2c50
Branches
No related tags found
No related merge requests found
Pipeline #15431 passed
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment