Skip to content

Find, verify, and analyze leaked credentials

set auth-in-url flag to true when using ssh clone (#4488)

Shahzad Haiderd005847359bb
diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.go
index 30efbd61f..129d92716 100644
--- a/pkg/sources/git/git.go
+++ b/pkg/sources/git/git.go
@@ -602,11 +602,11 @@ func CloneRepoUsingUnauthenticated(ctx context.Context, url, clonePath string, a
// CloneRepoUsingSSH clones a repo using SSH.
func CloneRepoUsingSSH(ctx context.Context, gitURL string, args ...string) (string, *git.Repository, error) {
if isCodeCommitURL(gitURL) {
- return CloneRepo(ctx, nil, gitURL, "", false, args...)
+ return CloneRepo(ctx, nil, gitURL, "", true, args...)
}
userInfo := url.User("git")
- return CloneRepo(ctx, userInfo, gitURL, "", false, args...)
+ return CloneRepo(ctx, userInfo, gitURL, "", true, args...)
}
var codeCommitRE = regexp.MustCompile(`ssh://git-codecommit\.[\w-]+\.amazonaws\.com`)