atuinsh/atuin · error
please provide a new password
Error message
please provide a new password
What it means
The change-password command requires a non-empty new password. If `--new-password` is absent it prompts; an empty result is rejected with this bail before any server call, since the server cannot set an empty password.
Source
Thrown at crates/atuin/src/command/client/account/change_password.rs:42
}
let client = auth::auth_client(settings).await;
let current_password = self.current_password.clone().unwrap_or_else(|| {
prompt_password("Please enter the current password: ")
.expect("Failed to read from input")
});
if current_password.is_empty() {
bail!("please provide the current password");
}
let new_password = self.new_password.clone().unwrap_or_else(|| {
prompt_password("Please enter the new password: ").expect("Failed to read from input")
});
if new_password.is_empty() {
bail!("please provide a new password");
}
let mut totp_code = self.totp_code.clone();
loop {
let response = client
.change_password(¤t_password, &new_password, totp_code.as_deref())
.await?;
match response {
MutateResponse::Success => break,
MutateResponse::TwoFactorRequired => {
totp_code = Some(super::login::or_user_input(None, "two-factor code"));
}
}
}
println!("Account password successfully changed!");View on GitHub (pinned to c0c717ab04)
Solutions
- Pass a non-empty value: `atuin account change-password --new-password '<new-pw>'`
- Check the variable/expansion feeding the flag is populated
- Run in an interactive terminal so the password prompt works
- Generate and store the new password via a secrets tool before invoking the command
Example fix
// before: NEWPW empty -> bails atuin account change-password --current-password "$CUR" --new-password "$NEWPW" // after: guard first [ -n "$NEWPW" ] && atuin account change-password --current-password "$CUR" --new-password "$NEWPW"
Defensive patterns
Strategy: validation
Validate before calling
[ -n "$NEW_PW" ] || { echo 'new password is empty' >&2; exit 1; } Try / catch
if ! atuin account change-password --new-password "$NEW_PW" ...; then echo "Password change failed — verify the new password is non-empty" >&2 fi
Prevention
- Pass --new-password explicitly when automating
- Generate the new password via a secrets manager before the call
- Validate variables with [ -n ... ] before use
- Avoid /dev/null stdin for commands that may prompt
When it happens
Trigger: Passing `--new-password ''` to `atuin account change-password`, or the interactive prompt returning an empty line because stdin is empty/closed in a non-interactive run.
Common situations: Headless CI runs with `/dev/null` stdin; unset shell variables in the flag; forgetting the `--new-password` flag while automating; password-manager CLI returning empty output.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- please provide the current password
- please provide your password
- please provide a password
- Config key must be non-empty and must not contain whitespace
- Failed to read from input
AI-assisted analysis of atuinsh/atuin@c0c717ab04 (2026-09-12).
Data as JSON: /api/errors/01bafbef9070363f.
Report an issue: GitHub.