Skip to content

Find, verify, and analyze leaked credentials

clone more refs (#2988)

Zachary Riced5b9157d2bfc
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.go
index 242222c0f..1c8af69cf 100644
--- a/pkg/sources/git/git.go
+++ b/pkg/sources/git/git.go
@@ -419,6 +419,8 @@ func executeClone(ctx context.Context, params cloneParams) (*git.Repository, err
"clone",
cloneURL.String(),
params.clonePath,
+ "-c",
+ "remote.origin.fetch=+refs/*:refs/remotes/origin/*",
"--quiet", // https://git-scm.com/docs/git-clone#Documentation/git-clone.txt-code--quietcode
}
gitArgs = append(gitArgs, params.args...)