diff --git a/cmd/flux/create_secret_git.go b/cmd/flux/create_secret_git.go index b9b2587d..31d2a2ef 100644 --- a/cmd/flux/create_secret_git.go +++ b/cmd/flux/create_secret_git.go @@ -142,7 +142,7 @@ func createSecretGitCmdRun(cmd *cobra.Command, args []string) error { logger.Generatef("deploy key: %s", string(pair.PublicKey)) } case "http", "https": - if sourceGitUsername == "" || sourceGitPassword == "" { + if secretGitUsername == "" || secretGitPassword == "" { return fmt.Errorf("for Git over HTTP/S the username and password are required") }