wasmerio/wasmer · error
No registry not specified!
Error message
No registry not specified!
What it means
`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.
Source
Thrown at lib/cli/src/commands/auth/logout.rs:32
/// Do not prompt for user input.
#[clap(long, default_value_t = !std::io::stdin().is_terminal())]
pub non_interactive: bool,
/// Whether or not to revoke the associated token
#[clap(long)]
pub revoke_token: bool,
}
#[async_trait::async_trait]
impl AsyncCliCommand for Logout {
type Output = ();
async fn run_async(self) -> Result<Self::Output, anyhow::Error> {
let registry = self.env.registry_endpoint()?.to_string();
let host_str = self
.env
.registry_public_url()
.map_err(|_| anyhow::anyhow!("No registry not specified!"))?
.host_str()
.unwrap()
.bold();
let client = self
.env
.client()
.map_err(|_| anyhow::anyhow!("Not logged into registry {host_str}"))?;
let user = wasmer_backend_api::query::current_user(&client)
.await
.map_err(|e| anyhow::anyhow!("Not logged into registry {host_str}: {e}"))?
.ok_or_else(|| anyhow::anyhow!("Not logged into registry {host_str}"))?;
let theme = dialoguer::theme::ColorfulTheme::default();
let prompt = dialoguer::Confirm::with_theme(&theme).with_prompt(format!(
"Log user {} out of registry {host_str}?",
user.usernameView on GitHub (pinned to 8c4b9ee9d3)
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.
Example fix
// before $ wasmer logout // error: No registry not specified! // after $ wasmer config set-registry registry.wasmer.io $ wasmer logout
Defensive patterns
Strategy: validation
Validate before calling
# confirm a registry is configured before logout
grep -q 'registry' ~/.wasmer/wasmer.toml || {
echo "no registry configured; run: wasmer config set-registry registry.wasmer.io";
exit 1;
} Prevention
- 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.
When it happens
Trigger: `wasmer logout` when `env.registry_public_url()` returns Err — typically no registry configured in wasmer.toml and no --registry flag provided.
Common situations: 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.
Related errors
- Not logged into registry {host_str}
- config from file: {e}
- Not logged into registry {host_str}: {e}
- Stack size must be 1024-bit aligned
- Could not find package with hash '{h}'
AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01).
Data as JSON: /api/errors/222d4389bbbcd570.
Report an issue: GitHub.