Documentation
¶
Index ¶
- func AddVMKey(hostname, key string) error
- func EnsureDirExists(path string, perm fs.FileMode, chmod bool) error
- func GithubUsernameFromLocalFile() (string, error)
- func SaveGithubUsernameToLocalFile(username string) error
- func SetupDevbox() error
- func SetupInsecureDebug(gatewayAddr string) error
- type Cmd
- type ControlSocket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddVMKey ¶
AddVMKey sets the private SSH key for the given Devbox VM host. If a key was previously set for the host, AddVMKey replaces it with the new key. The old key is not recoverable.
AddVMKey only manages keys specific to Devbox Cloud. It will not touch any of the user's keys in ~/.ssh.
func SetupDevbox ¶
func SetupDevbox() error
SetupDevbox updates the user's OpenSSH configuration so that they can connect to Devbox Cloud hosts. It does nothing if Devbox Cloud is already configured.
func SetupInsecureDebug ¶
SetupInsecureDebug is like SetupDevbox, but also configures an additional gateway with host key checking disabled. If gatewayAddr is a well-known *.synopkg.github.io/devbox gateway, then SetupInsecureDebug doesn't add any extra hosts and acts identically to SetupDevbox.
Types ¶
type Cmd ¶
type Cmd struct {
// DestinationAddr is a "hostname[:port]" that specifies the remote host
// and port to connect to.
DestinationAddr string
// Username is the remote login name.
Username string
PathInVM string
ShellStartTime string // unix timestamp
}
func (*Cmd) ExecRemoteWithRetry ¶
ExecRemoteWithRetry runs the given command on the remote host, retrying with an exponential backoff if the command fails. maxWait is the maximum seconds we wait in between retries.
type ControlSocket ¶
func DevboxControlSockets ¶
func DevboxControlSockets() []ControlSocket