Skip to content

Commit e6e3095

Browse files
committed
[cloud] Fix password ssh key (#568)
The stepper is stepping over the password prompt. Remove it for now. Using a password protected key, I stopped ssh-agent, deleted the devbox vm socket, and deleted github_username `devbox cloud shell` <img width="984" alt="image" src="https://user-images.githubusercontent.com/544948/216123883-99f85212-1d77-4386-a5f5-488cda04b4b4.png">
1 parent bb24b16 commit e6e3095

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/cloud/cloud.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,19 @@ func Shell(w io.Writer, projectDir string, githubUsername string) error {
7676
}
7777

7878
if vmHostname == "" {
79-
stepVM := stepper.Start(w, "Creating a virtual machine on the cloud...")
79+
color.New(color.FgGreen).Fprintln(w, "Creating a virtual machine on the cloud...")
8080
// Inspect the ssh ControlPath to check for existing connections
8181
vmHostname = vmHostnameFromSSHControlPath()
8282
if vmHostname != "" {
8383
debug.Log("Using vmHostname from ssh socket: %v", vmHostname)
84-
stepVM.Success("Detected existing virtual machine")
84+
color.New(color.FgGreen).Fprintln(w, "Detected existing virtual machine")
8585
} else {
8686
var region string
8787
vmHostname, region, err = getVirtualMachine(sshClient)
8888
if err != nil {
8989
return err
9090
}
91-
stepVM.Success("Created a virtual machine in %s", fly.RegionName(region))
91+
color.New(color.FgGreen).Fprintf(w, "Created a virtual machine in %s\n", fly.RegionName(region))
9292

9393
// We save the username to local file only after we get a successful response
9494
// from the gateway, because the gateway will verify that the user's SSH keys
@@ -101,13 +101,13 @@ func Shell(w io.Writer, projectDir string, githubUsername string) error {
101101
}
102102
debug.Log("vm_hostname: %s", vmHostname)
103103

104-
s2 := stepper.Start(w, "Starting file syncing...")
104+
color.New(color.FgGreen).Fprintln(w, "Starting file syncing...")
105105
err = syncFiles(username, vmHostname, projectDir)
106106
if err != nil {
107-
s2.Fail("Starting file syncing [FAILED]")
107+
color.New(color.FgRed).Fprintln(w, "Starting file syncing [FAILED]")
108108
return err
109109
}
110-
s2.Success("File syncing started")
110+
color.New(color.FgGreen).Fprintln(w, "File syncing started")
111111

112112
s3 := stepper.Start(w, "Connecting to virtual machine...")
113113
time.Sleep(1 * time.Second)

0 commit comments

Comments
 (0)