Documentation
¶
Index ¶
Constants ¶
View Source
const ( KnownHostsEnvVar = "SSH_KNOWN_HOSTS" DefaultGitSSHUser = "git" // Default SSH user for Git servers DefaultGitSSHPort = 22 // Default SSH port for Git servers )
View Source
const (
SocketAgentSocketEnvVar = "SSH_AUTH_SOCK"
)
Variables ¶
View Source
var ErrSSHAgentSocketPathEmpty = errors.New("socket path cannot be empty")
View Source
var (
KnownHostsFilePath = filepath.Join(os.TempDir(), "known_hosts")
)
Functions ¶
func AddToKnownHosts ¶ added in v0.67.1
AddToKnownHosts adds the host from the SSH URL to the known_hosts file.
func IsHostKeyMismatchError ¶ added in v0.78.0
IsHostKeyMismatchError returns true when an SSH operation failed due to host key mismatch.
func RefreshKnownHost ¶ added in v0.78.0
RefreshKnownHost replaces the known_hosts entry for the given SSH URL and fetches the current server key.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.