ssh

package
v0.39.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package ssh provides SSH authentication utilities for Git operations.

Index

Constants

View Source
const InsecureAllowMissingKnownHostsFlag = "--insecure-allow-missing-known-hosts"

InsecureAllowMissingKnownHostsFlag is the controller flag, surfaced in error text, that opts out of SSH host key verification when no host-key source produced any known_hosts at all.

Variables

This section is empty.

Functions

func GetAuthMethod

func GetAuthMethod(privateKey, password, knownHosts string, allowMissingKnownHosts bool) (transport.AuthMethod, error)

GetAuthMethod returns an SSH public key authentication method from a private key.

Host key verification fails closed: a known_hosts source is required. A known_hosts value that is present but cannot be parsed is always a hard error — if a host key is declared it must be valid. When no known_hosts is available at all, GetAuthMethod returns an error unless allowMissingKnownHosts is set (the controller's --insecure-allow-missing-known-hosts flag), which disables host key verification and is intended for throwaway/dev clusters only.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL