Documentation
¶
Overview ¶
Package gitconfig carries the git identity of the host into the VM.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoLogin = errors.New("git on this machine has no login for it")
ErrNoLogin is a remote git on the host has no login for.
var ErrNoSSHKey = errors.New("this machine has no SSH key for it that aibox can use, in the SSH agent or in a key file without a passphrase")
ErrNoSSHKey is a server for which the host has no SSH key aibox can use without asking: none in the agent, and none of the key files ssh would try that needs no passphrase.
var ErrProxy = errors.New("the ssh config reaches it with ProxyJump or ProxyCommand, which aibox does not do")
ErrProxy is a host the ssh config reaches through another host or a command, which aibox cannot do.
var ErrUnknownHost = errors.New("the server is not in the known hosts of this machine, connect once with ssh to add it")
ErrUnknownHost is a server that is not in the known hosts of the host.
Functions ¶
func HostKeyAlgorithms ¶ added in v1.4.0
func HostKeyAlgorithms(known ssh.HostKeyCallback, address string) ([]string, error)
HostKeyAlgorithms returns the algorithms of the keys the known hosts hold for the address, so that the server is asked for one of those and not for a type the known hosts do not hold.
func NewHostKeyCheck ¶ added in v1.4.0
func NewHostKeyCheck(known ssh.HostKeyCallback) ssh.HostKeyCallback
NewHostKeyCheck returns the check of the known hosts that says what is wrong with the key of a server in words the person can act on.
Types ¶
type Login ¶ added in v1.4.0
Login is the user name and password, or token, git on the host uses for a remote.
type SSHKeys ¶ added in v1.4.0
type SSHKeys struct {
// Config is the ssh config file, or empty for the one ssh reads.
Config string
// contains filtered or unexported fields
}
SSHKeys find how the host reaches a server over SSH, as ssh would. They are used before the VM starts, since aibox can open no files once it is confined. The keys of an agent go through a connection to it that stays open until Close.
func LoadSSHKeys ¶ added in v1.4.0
LoadSSHKeys returns the SSH keys of the host, which reach agents and read files only when asked For a host.
func (*SSHKeys) Close ¶ added in v1.4.0
func (k *SSHKeys) Close()
Close closes the connections to the agents.
type SSHTarget ¶ added in v1.4.0
type SSHTarget struct {
// Address is the host name and port to dial, which the ssh config
// may change.
Address string
User string
Signers []ssh.Signer
// HostKey checks the key of the server and says what is wrong with it.
HostKey ssh.HostKeyCallback
// HostKeyAlgorithms are those of the keys the known hosts hold for the
// server.
HostKeyAlgorithms []string
// Keys name the keys, for the person to see which ones aibox uses.
Keys []string
}
SSHTarget is how aibox reaches a server over SSH, as ssh would.