From 7bd6aedb73a1de12631ec4c92fb31d178b41f91b Mon Sep 17 00:00:00 2001
From: Hidde Beydals <hello@hidde.co>
Date: Thu, 8 Apr 2021 12:06:33 +0200
Subject: [PATCH] Take PK from file into account in Git bootstrap

Signed-off-by: Hidde Beydals <hello@hidde.co>
---
 cmd/flux/bootstrap_git.go | 3 +++
 1 file changed, 3 insertions(+)

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
-- 
GitLab