Skip to content

Commit

Permalink
Merge pull request #3117 from carlosonunez-vmw/main
Browse files Browse the repository at this point in the history
Maintain original scheme when using --token-auth
  • Loading branch information
stefanprodan authored Sep 28, 2022
2 parents 1ac380a + 45a00a0 commit 04de520
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/flux/bootstrap_git.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04de520

Please sign in to comment.