From eeba35cea90d4335bb4b2348485d106d6a1ab5d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Trifir=C3=B2?= Date: Mon, 2 May 2022 11:54:12 +0200 Subject: [PATCH] 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 --- dvc/scm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc/scm.py b/dvc/scm.py index 05f29f1502..9c81579ad6 100644 --- a/dvc/scm.py +++ b/dvc/scm.py @@ -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))