mirror of
https://github.com/fluxcd/flux2.git
synced 2025-10-29 07:19:07 +08:00
Use proper Host configuration for SSH
This removes the usage of Hostname() which does not honor configured SSH port to be used. Resolves: #1377 See also: #1101, #1102 Signed-off-by: Tobias Jakobsson <jakobsson.tobias@gmail.com>
This commit is contained in:
@ -173,7 +173,6 @@ func bootstrapGitCmdRun(cmd *cobra.Command, args []string) error {
|
||||
// Configure repository URL to match auth config for sync.
|
||||
repositoryURL.User = url.User(gitArgs.username)
|
||||
repositoryURL.Scheme = "ssh"
|
||||
repositoryURL.Host = repositoryURL.Hostname()
|
||||
if bootstrapArgs.sshHostname != "" {
|
||||
repositoryURL.Host = bootstrapArgs.sshHostname
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user