From 9e0a2e9ddda9aba26fee1aa74c224b63442ceb34 Mon Sep 17 00:00:00 2001 From: ahrav Date: Sat, 22 Jul 2023 20:25:45 -0700 Subject: [PATCH] [chore] - Remove password info from log (#1528) * Remove password info from log. * update. * one more. --- pkg/sources/git/git.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.go index b8be0f50b88a..41e6a937687f 100644 --- a/pkg/sources/git/git.go +++ b/pkg/sources/git/git.go @@ -755,7 +755,7 @@ func PrepareRepoSinceCommit(ctx context.Context, uriString, commitHash string) ( } path, _, err = CloneRepoUsingToken(ctx, password, remotePath, uri.User.Username(), "--shallow-since", timestamp) if err != nil { - return path, true, fmt.Errorf("failed to clone authenticated Git repo (%s): %s", remotePath, err) + return path, true, fmt.Errorf("failed to clone authenticated Git repo (%s): %s", uri.Redacted(), err) } default: ctx.Logger().V(1).Info("cloning repo without authentication", "uri", uri) @@ -793,7 +793,7 @@ func PrepareRepo(ctx context.Context, uriString string) (string, bool, error) { } path, _, err = CloneRepoUsingToken(ctx, password, remotePath, uri.User.Username()) if err != nil { - return path, remote, fmt.Errorf("failed to clone authenticated Git repo (%s): %s", remotePath, err) + return path, remote, fmt.Errorf("failed to clone authenticated Git repo (%s): %s", uri.Redacted(), err) } default: ctx.Logger().V(1).Info("cloning repo without authentication", "uri", uri)