atuinsh/atuin · error
please provide a password
Error message
please provide a password
What it means
Headless (v0 API) registration requires a non-empty password. When username, email, and password flags are all provided, `atuin register` skips interactive prompts and validates the password; an empty password is rejected with this bail before calling the server.
Source
Thrown at crates/atuin/src/command/client/account/register.rs:67
let provided = [self.username.is_some(), self.email.is_some(), self.password.is_some()]
.iter()
.filter(|&b| *b)
.count();
if provided < required_for_headless {
println!(
"Username, password, and email are all required for headless registration. \
Continuing with interactive registration.\n"
);
}
if let (Some(username), Some(email), Some(password)) =
(&self.username, &self.email, &self.password)
{
// Headless registration via v0 API (for CI / scripting).
let client = auth::auth_client(settings).await;
if password.is_empty() {
bail!("please provide a password");
}
let response = client.register(username, email, password).await?;
match response {
AuthResponse::Success { session, auth_type } => {
let meta = Settings::meta_store().await?;
let is_hub_token =
auth_type.as_deref() == Some("hub") || session.starts_with("atapi_");
if is_hub_token {
meta.save_hub_session(&session).await?;
} else {
meta.save_session(&session).await?;
println!(
"\nNote: Your account has not been fully migrated to Atuin Hub."
);
println!(View on GitHub (pinned to c0c717ab04)
Solutions
- Pass a non-empty password: `atuin register --username <u> --email <e> --password <pw>`
- Fix the env var/expansion feeding --password so it is populated
- Omit --password to use the interactive prompt instead of headless mode
- Generate the password programmatically (e.g. from a secrets manager) before invoking
Example fix
// before: REGPW unset -> empty -> bail atuin register --username "$U" --email "$E" --password "$REGPW" // after [ -n "$REGPW" ] || REGPW=$(op read op://vault/atuin/password) atuin register --username "$U" --email "$E" --password "$REGPW"
Defensive patterns
Strategy: validation
Validate before calling
[ -n "$REGPW" ] || { echo 'password required for headless registration' >&2; exit 1; } Try / catch
if ! atuin register --username "$U" --email "$E" --password "$REGPW"; then echo "Registration failed — check password was non-empty and inputs valid" >&2 fi
Prevention
- Validate all three flags (username, email, password) before headless registration
- Fetch passwords from a secrets manager instead of ambient env vars
- Use `set -u` and [ -n ... ] assertions in provisioning scripts
- Prefer interactive registration when a TTY is available
When it happens
Trigger: Running `atuin register --username u --email e --password ''` or with the password variable unset/empty in CI scripts that use headless registration.
Common situations: CI provisioning accounts where the password env var was never set; password-manager CLI returning empty output; whitespace-only value isn't caught here but empty string is; missing flag in scripted invocations.
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 a new password
- please provide your password
- unexpected two-factor requirement during registration
- Config key must be non-empty and must not contain whitespace
AI-assisted analysis of atuinsh/atuin@c0c717ab04 (2026-09-12).
Data as JSON: /api/errors/c313234c59f2dc2c.
Report an issue: GitHub.