Skip to content

Commit

Permalink
scm: fix clone
Browse files Browse the repository at this point in the history
`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 iterative#7670
  • Loading branch information
dtrifiro committed Jun 2, 2022
1 parent 1cc803d commit eeba35c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dvc/scm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit eeba35c

Please sign in to comment.