{"record":{"id":"8a321c077a4efedf","repo":"basecamp/kamal","slug":"lastpass-cli-is-not-installed","errorCode":null,"errorMessage":"LastPass CLI is not installed","messagePattern":"LastPass CLI is not installed","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/kamal/secrets/adapters/last_pass.rb","lineNumber":33,"sourceCode":"      secrets = prefixed_secrets(secrets, from: from)\n      items = `lpass show #{secrets.map(&:shellescape).join(\" \")} --json`\n      raise RuntimeError, \"Could not read #{secrets} from LastPass\" unless $?.success?\n\n      items = JSON.parse(items)\n\n      {}.tap do |results|\n        items.each do |item|\n          results[item[\"fullname\"]] = item[\"password\"]\n        end\n\n        if (missing_items = secrets - results.keys).any?\n          raise RuntimeError, \"Could not find #{missing_items.join(\", \")} in LastPass\"\n        end\n      end\n    end\n\n    def check_dependencies!\n      raise RuntimeError, \"LastPass CLI is not installed\" unless cli_installed?\n    end\n\n    def cli_installed?\n      `lpass --version 2> /dev/null`\n      $?.success?\n    end\nend\n","sourceCodeStart":15,"sourceCodeEnd":41,"githubUrl":"https://github.com/basecamp/kamal/blob/eee0083b38661c3707c6b6052cc89e85038a096c/lib/kamal/secrets/adapters/last_pass.rb#L15-L41","documentation":"Raised by check_dependencies! in Kamal::Secrets::Adapters::LastPass when `lpass --version 2> /dev/null` exits non-zero. Base#fetch invokes this probe before login, so on machines without the LastPass CLI any `kamal secrets pull` using this adapter fails here first. stderr is suppressed, so both 'binary missing' and 'binary broken' render identically.","triggerScenarios":"adapter.fetch(...) on a host where `lpass` is not on PATH: lpass never installed (it is a separate package from the browser extension/app), installed via a package manager path not in the kamal process's PATH, or an incompatible/incomplete build.","commonSituations":"Assuming the LastPass browser plugin or desktop app provides lpass (it does not); CI images without the lpass package; installing lpass from source into /usr/local/bin that is later dropped from PATH in minimal container shells.","solutions":["Install the official LastPass CLI: `brew install lastpass-cli` (macOS) or `apt install lastpass-cli` (Debian/Ubuntu), then confirm `lpass --version`.","If installed but not found, fix PATH in the environment running kamal (Dockerfile ENV, CI step).","Add the install to your CI/provisioning pipeline before any `kamal secrets pull`."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"require \"open3\"\n\ndef lpass_installed?\n  Open3.capture3(\"lpass\", \"--version\")[2].success?\nend\n\nabort \"Install lastpass-cli (brew install lastpass-cli / apt install lastpass-cli)\" unless lpass_installed?","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install lastpass-cli in CI/containers; the browser extension does not provide lpass.","Assert `which lpass` in deploy preflight for environments with restricted PATH.","Keep the CLI version current — old builds fail auth against LastPass servers."],"tags":["ruby","kamal","lastpass","cli","dependency","path","secrets"],"backgroundTag":"cli-not-installed","analyzedSha":"eee0083b38661c3707c6b6052cc89e85038a096c","analyzedAt":"2026-08-21T15:17:22.045Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}