Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregsadetsky committed Jun 14, 2024
2 parents a5f43fe + 33e1c8d commit 0a95833
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ async function installDockerIfNeeded({
try {
await installDocker({ssh, verbose, progressBar})
} catch (error) {
if ((error as Error).toString().includes('Could not get lock')) {
throw new Error(`Package manager already busy. Try again in a few minutes.`)
}

throw new Error(`Failed to install Docker\n${error}`)
}
} else if (verbose) {
Expand Down Expand Up @@ -569,6 +573,14 @@ async function uploadRootSshPublicKey({
stdin: password,
progressBar: undefined,
})
// on AWS EC2 Ubuntu, they have this preventing you from logging in as root, remove it.
await runSshCommand({
ssh,
command: `sudo sed -i '/Please login as the user/d' /root/.ssh/authorized_keys`,
verbose,
stdin: password,
progressBar: undefined,
})
let keyAlreadyAuthorized
try {
await runSshCommand({
Expand Down

0 comments on commit 0a95833

Please sign in to comment.