atuinsh/atuin · error
invalid credentials
Error message
invalid credentials
What it means
Match arm in the auth-module login: the Hub responded HTTP 401 UNAUTHORIZED, meaning the username/password (or key) presented to the login endpoint do not match any account. An input-validity sentinel — the credentials themselves are at fault, not connectivity or server state.
Source
Thrown at crates/atuin-client/src/auth.rs:316
if status.is_success() {
let login: LoginResponse = resp.json().await?;
return Ok(AuthResponse::Success {
session: login.session,
auth_type: login.auth,
});
}
if status == StatusCode::FORBIDDEN
&& let Ok(err) = resp.json::<HubErrorResponse>().await
{
if err.code.as_deref() == Some("2fa_required") {
return Ok(AuthResponse::TwoFactorRequired);
}
bail!("{}", err.reason);
}
if status == StatusCode::UNAUTHORIZED {
bail!("invalid credentials");
}
bail!("Hub login failed with status {status}");
}
async fn register(&self, username: &str, email: &str, password: &str) -> Result<AuthResponse> {
let url = self.address.append_path("api/v0/register")?;
let client = reqwest::Client::new();
let resp = client
.post(url)
.header(USER_AGENT, APP_USER_AGENT)
.header(ATUIN_HEADER_VERSION, ATUIN_CARGO_VERSION)
.json(&serde_json::json!({
"email": email,
"username": username,
"password": password,
}))View on GitHub (pinned to c0c717ab04)
Solutions
- Re-enter username and password carefully
- Confirm the account exists (register first if not)
- Check that you are pointing at the expected sync/hub server
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/atuin-client/src/auth.rs:316 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/586b576efa2de545.
Report an issue: GitHub.