From 8b5583930e0cf594068dfbce771d2c9e243ccd60 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Wed, 7 Apr 2021 14:09:25 +0300 Subject: [PATCH] Fix create source git auth for non-HTTPS repos Signed-off-by: Stefan Prodan --- cmd/flux/create_source_git.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/flux/create_source_git.go b/cmd/flux/create_source_git.go index c4b2fb18..8de87e92 100644 --- a/cmd/flux/create_source_git.go +++ b/cmd/flux/create_source_git.go @@ -240,6 +240,9 @@ func createSourceGitCmdRun(cmd *cobra.Command, args []string) error { secretOpts.Username = sourceGitArgs.username secretOpts.Password = sourceGitArgs.password secretOpts.CAFilePath = sourceGitArgs.caFile + case "http": + secretOpts.Username = sourceGitArgs.username + secretOpts.Password = sourceGitArgs.password } secret, err := sourcesecret.Generate(secretOpts) if err != nil {