mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-20 22:51:47 +00:00
Merge pull request #1231 from fluxcd/git-custom-pk
Take private key from file into account in Git bootstrap
This commit is contained in:
commit
de4b3ef3dc
1 changed files with 3 additions and 0 deletions
|
|
@ -173,6 +173,9 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error {
|
||||||
if bootstrapArgs.sshHostname != "" {
|
if bootstrapArgs.sshHostname != "" {
|
||||||
repositoryURL.Host = bootstrapArgs.sshHostname
|
repositoryURL.Host = bootstrapArgs.sshHostname
|
||||||
}
|
}
|
||||||
|
if bootstrapArgs.privateKeyFile != "" {
|
||||||
|
secretOpts.PrivateKeyPath = bootstrapArgs.privateKeyFile
|
||||||
|
}
|
||||||
|
|
||||||
// Configure last as it depends on the config above.
|
// Configure last as it depends on the config above.
|
||||||
secretOpts.SSHHostname = repositoryURL.Host
|
secretOpts.SSHHostname = repositoryURL.Host
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue