atuinsh/atuin · error

please provide your password

Error message

please provide your password

What it means

The account-deletion password resolved to an empty string. Deletion requires re-authentication with the account password; an empty value cannot authenticate, so `run` bails before calling `client.delete_account`.

Solutions

  1. Pass the real account password via `--password`
  2. Export and verify the password environment variable is non-empty
  3. Type the password at the prompt instead of piping empty input

Example fix

// before
atuin account delete --password "$PW"   # PW empty
// after
: "${PW:?PW must be set}"
atuin account delete --password "$PW"
Defensive patterns

Strategy: validation

Validate before calling

: "${PW:?account password must be set}"
[ -n "$PW" ] || exit 1

Try / catch

atuin account delete --password "$PW" ... || { echo 'empty or wrong password'; exit 1; }

Prevention

When it happens

Trigger: `--password ''` on the command line; empty/unset env var interpolated into the flag; `read_user_password` reading an empty line from the terminal or piped stdin.

Common situations: Automation passing `$PASSWORD` that is unset; redirected stdin providing an empty first line; user pressing Enter at the password prompt.

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@900007c480 (2026-09-19). Data as JSON: /api/errors/b053decd874be6b0. Report an issue: GitHub.

Appendix: 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 900007c480)