atuinsh/atuin · error

please provide your password

Error message

please provide your password

What it means

Account deletion requires the account password as confirmation. If `--password` was not given, atuin prompts; an empty resolved password is rejected with this bail instead of being sent to the server, which would fail anyway.

Source

Thrown at crates/atuin/src/command/client/account/delete.rs:29

    pub password: Option<String>,

    /// The two-factor authentication code for your account, if any
    #[clap(long, short)]
    pub totp_code: Option<String>,
}

impl Cmd {
    pub async fn run(&self, settings: &Settings) -> Result<()> {
        if !settings.logged_in().await? {
            bail!("You are not logged in");
        }

        let client = auth::auth_client(settings).await;

        let password = self.password.clone().unwrap_or_else(read_user_password);

        if password.is_empty() {
            bail!("please provide your password");
        }

        let mut totp_code = self.totp_code.clone();

        loop {
            let response = client.delete_account(&password, totp_code.as_deref()).await?;

            match response {
                MutateResponse::Success => break,
                MutateResponse::TwoFactorRequired => {
                    totp_code = Some(or_user_input(None, "two-factor code"));
                }
            }
        }

        // Clean up sessions from meta store
        let meta = Settings::meta_store().await?;
        meta.delete_session().await?;

View on GitHub (pinned to c0c717ab04)

Solutions

  1. Provide the password explicitly: `atuin account delete --password '<pw>'`
  2. Fix the variable/expansion that is resolving to an empty string
  3. Run in an interactive terminal so the password prompt can read input
  4. Inject the secret from a password manager rather than an empty placeholder

Example fix

// before: ACCPW unset -> empty -> bail
atuin account delete --password "$ACCPW"

// after
[ -n "$ACCPW" ] && atuin account delete --password "$ACCPW"
Defensive patterns

Strategy: validation

Validate before calling

[ -n "$ACCPW" ] || { echo 'account password is empty' >&2; exit 1; }

Try / catch

if ! atuin account delete --password "$ACCPW"; then
  echo "Account deletion failed — check the password was provided" >&2
fi

Prevention

When it happens

Trigger: Passing `--password ''` to `atuin account delete`, or running non-interactively with empty stdin so `read_user_password` yields an empty string.

Common situations: Automation scripts that pipe empty input; unset env var expanded into the flag; CI jobs with no TTY; mistyped flag name so the value never reaches the command.

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


AI-assisted analysis of atuinsh/atuin@c0c717ab04 (2026-09-12). Data as JSON: /api/errors/b053decd874be6b0. Report an issue: GitHub.