diff --git a/cmd/flux/bootstrap_git.go b/cmd/flux/bootstrap_git.go index 27515775..2f5e2491 100644 --- a/cmd/flux/bootstrap_git.go +++ b/cmd/flux/bootstrap_git.go @@ -192,7 +192,9 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error { // Configure repository URL to match auth config for sync. repositoryURL.User = nil - repositoryURL.Scheme = "https" + if !gitArgs.insecureHttpAllowed { + repositoryURL.Scheme = "https" + } } else { secretOpts.PrivateKeyAlgorithm = sourcesecret.PrivateKeyAlgorithm(bootstrapArgs.keyAlgorithm) secretOpts.Password = gitArgs.password