{"record":{"id":"222d4389bbbcd570","repo":"wasmerio/wasmer","slug":"no-registry-not-specified","errorCode":null,"errorMessage":"No registry not specified!","messagePattern":"No registry not specified!","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/cli/src/commands/auth/logout.rs","lineNumber":32,"sourceCode":"    /// Do not prompt for user input.\n    #[clap(long, default_value_t = !std::io::stdin().is_terminal())]\n    pub non_interactive: bool,\n\n    /// Whether or not to revoke the associated token\n    #[clap(long)]\n    pub revoke_token: bool,\n}\n\n#[async_trait::async_trait]\nimpl AsyncCliCommand for Logout {\n    type Output = ();\n\n    async fn run_async(self) -> Result<Self::Output, anyhow::Error> {\n        let registry = self.env.registry_endpoint()?.to_string();\n        let host_str = self\n            .env\n            .registry_public_url()\n            .map_err(|_| anyhow::anyhow!(\"No registry not specified!\"))?\n            .host_str()\n            .unwrap()\n            .bold();\n\n        let client = self\n            .env\n            .client()\n            .map_err(|_| anyhow::anyhow!(\"Not logged into registry {host_str}\"))?;\n\n        let user = wasmer_backend_api::query::current_user(&client)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Not logged into registry {host_str}: {e}\"))?\n            .ok_or_else(|| anyhow::anyhow!(\"Not logged into registry {host_str}\"))?;\n\n        let theme = dialoguer::theme::ColorfulTheme::default();\n        let prompt = dialoguer::Confirm::with_theme(&theme).with_prompt(format!(\n            \"Log user {} out of registry {host_str}?\",\n            user.username","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/cli/src/commands/auth/logout.rs#L14-L50","documentation":"`wasmer logout` resolves the registry endpoint and then its public URL to print the host. If `registry_public_url()` fails, the CLI raises `No registry not specified!` (sic — it means no registry is configured). Logout cannot proceed without knowing which registry to log out of.","triggerScenarios":"`wasmer logout` when `env.registry_public_url()` returns Err — typically no registry configured in wasmer.toml and no --registry flag provided.","commonSituations":"Fresh install where `wasmer config set-registry` was never run; WASMER_DIR pointing at an empty/nonexistent dir; typo'd or missing registry field in wasmer.toml; invoking logout in CI before any login/config setup.","solutions":["Set a registry first: `wasmer config set-registry registry.wasmer.io`, then retry logout.","Pass the registry explicitly, e.g. `wasmer logout --registry registry.wasmer.io`.","Check that WASMER_DIR points to a directory with a valid wasmer.toml containing a registry entry.","If you never logged in, logout is unnecessary — ignore the error."],"exampleFix":"// before\n$ wasmer logout\n// error: No registry not specified!\n// after\n$ wasmer config set-registry registry.wasmer.io\n$ wasmer logout","handlingStrategy":"validation","validationCode":"# confirm a registry is configured before logout\ngrep -q 'registry' ~/.wasmer/wasmer.toml || { \n  echo \"no registry configured; run: wasmer config set-registry registry.wasmer.io\"; \n  exit 1; \n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run `wasmer config set-registry` once after installing the CLI.","In CI, always pass --registry explicitly instead of relying on local config.","Verify WASMER_DIR points at the directory containing your wasmer.toml."],"tags":["auth","logout","registry","configuration"],"backgroundTag":"registry-not-configured","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}