Merge pull request #1231 from fluxcd/git-custom-pk

Take private key from file into account in Git bootstrap
This commit is contained in:
Stefan Prodan 2021-04-08 13:30:51 +03:00 committed by GitHub
commit de4b3ef3dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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