diff --git a/cmd/flux/bootstrap_git.go b/cmd/flux/bootstrap_git.go index 2f4c49d1..2d5f381f 100644 --- a/cmd/flux/bootstrap_git.go +++ b/cmd/flux/bootstrap_git.go @@ -173,6 +173,9 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error { if bootstrapArgs.sshHostname != "" { repositoryURL.Host = bootstrapArgs.sshHostname } + if bootstrapArgs.privateKeyFile != "" { + secretOpts.PrivateKeyPath = bootstrapArgs.privateKeyFile + } // Configure last as it depends on the config above. secretOpts.SSHHostname = repositoryURL.Host