atuinsh/atuin · error
Your Hub session token is invalid. Please run 'atuin login'
Error message
Your Hub session token is invalid. Please run 'atuin login' to re-authenticate with Atuin Hub.
What it means
Hard guard at the top of the auth-module change_password: no Hub token is present in local config, so no authenticated password-change request can even be attempted. This is a local preconditions check — the user has never completed Hub login on this machine.
Source
Thrown at crates/atuin-client/src/auth.rs:367
if let Ok(err) = resp.json::<HubErrorResponse>().await {
bail!("{}", err.reason);
}
bail!("Hub registration failed with status {status}");
}
async fn change_password(
&self,
current_password: &str,
new_password: &str,
totp_code: Option<&str>,
) -> Result<MutateResponse> {
let hub_token = self.hub_token.as_deref().ok_or_else(|| {
eyre::eyre!("Not logged in to Atuin Hub. Please run 'atuin login' to authenticate.")
})?;
if !hub_token.starts_with("atapi_") {
bail!(
"Your Hub session token is invalid. Please run 'atuin login' to re-authenticate \
with Atuin Hub."
);
}
let url = self.address.append_path("api/v0/account/password")?;
let client = reqwest::Client::new();
let mut body = serde_json::json!({
"current_password": current_password,
"new_password": new_password,
});
if let Some(code) = totp_code {
body["totp_code"] = serde_json::Value::String(code.to_string());
}
let resp = client
.patch(url)View on GitHub (pinned to c0c717ab04)
Solutions
- Run 'atuin login' to authenticate and obtain a Hub session/token
- Verify the config file storing the Hub token exists and is readable
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/atuin-client/src/auth.rs:367 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of atuinsh/atuin@c0c717ab04 (2026-09-12).
Data as JSON: /api/errors/a0a826b058d74804.
Report an issue: GitHub.