scm: fix clone

`fetch_all_exp()` in `clone()` was called with `url="origin"`, which
resulted in the operation being performed with the remote URL defined
in the cloned repo's config, which did not include any credentials
initially provided to clone.

Fixes #7670
This commit is contained in:
Daniele Trifirò
2022-06-07 05:11:05 -07:00
committed by Peter Rowlands (변기호)
parent 33b3afa2f5
commit 41ecd2e204
+1 -1
View File
@@ -144,7 +144,7 @@ def clone(url: str, to_path: str, **kwargs):
try:
git = Git.clone(url, to_path, progress=pbar.update_git, **kwargs)
if "shallow_branch" not in kwargs:
fetch_all_exps(git, "origin", progress=pbar.update_git)
fetch_all_exps(git, url, progress=pbar.update_git)
return git
except InternalCloneError as exc:
raise CloneError(str(exc))