diff --git a/src/commands/init.ts b/src/commands/init.ts index 4bac8d5..b421ae5 100644 --- a/src/commands/init.ts +++ b/src/commands/init.ts @@ -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) { @@ -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({