jdx/mise · error
not connected: choose --sync manual, --sync sync, or --sync
Error message
not connected: choose --sync manual, --sync sync, or --sync fetch-only to connect without a mode prompt
What it means
This error is thrown by `mise bootstrap dotfiles origin` (run) when the sync-mode interactive prompt cannot be answered (stdin unavailable or non-interactive terminal) and the user selected no explicit --sync mode. mise refuses to silently pick a mode for publishing/applying dotfile changes, so it aborts with guidance to pass the mode on the command line.
Source
Thrown at src/cli/dotfiles/origin.rs:95
}
}
impl DotfilesOriginSet {
async fn run(self) -> Result<()> {
if !crate::config::Settings::get().history.enabled {
bail!("history is disabled (history.enabled = false)");
}
let mode = match self.sync.as_deref() {
Some(mode) => SyncMode::parse(mode)?,
None if self.yes || crate::config::Settings::get().yes => SyncMode::current()?,
None => match crate::ui::prompt::confirm_with_default(
"Automatically publish saved edits AND apply incoming changes to live files? Choose no for manual sharing; local autosave continues in either mode.",
false,
)? {
crate::ui::prompt::Confirmation::Yes => SyncMode::Sync,
crate::ui::prompt::Confirmation::No => SyncMode::Manual,
crate::ui::prompt::Confirmation::Unavailable => {
bail!(
"not connected: choose --sync manual, --sync sync, or --sync fetch-only to connect without a mode prompt"
);
}
},
};
let (store, tracked, _) = super::history::open().await?;
if let Some(reason) = store.unavailable() {
bail!("cannot connect a setup repository: {reason}");
}
origin::set(
&store,
&tracked,
&origin::SetOptions {
url: self.url.clone(),
branch: self.branch.clone(),
mode,
yes: self.yes,
},View on GitHub (pinned to afd2eddd3a)
Solutions
- Re-run with an explicit mode: `mise bootstrap dotfiles origin --sync sync` to publish and apply
- Use `--sync manual` to only publish saved edits without applying incoming changes
- Use `--sync fetch-only` if supported, to only receive incoming changes
- Run the command interactively in a real TTY so the prompt can be answered
Example fix
// before mise bootstrap dotfiles origin git@github.com:me/dotfiles.git // after mise bootstrap dotfiles origin --sync sync git@github.com:me/dotfiles.git
Defensive patterns
Strategy: validation
Validate before calling
# Non-interactive callers must pass --sync explicitly if [ ! -t 0 ]; then SYNC_FLAG="--sync sync" # or manual / fetch-only else SYNC_FLAG="" fi mise bootstrap dotfiles origin $SYNC_FLAG "$REMOTE_URL"
Prevention
- Always pass --sync when invoking dotfiles origin from scripts or CI
- Check for a TTY (-t 0) before relying on interactive prompts
- Encode the chosen sync mode in your dotfiles bootstrap script
When it happens
Trigger: Running `mise bootstrap dotfiles origin` without --sync in a non-interactive environment (CI, script, piped stdin) so crate::ui::prompt::Confirmation::Unavailable is returned from the sync-mode confirmation prompt.
Common situations: CI pipelines or shell scripts invoking the origin connect command without a TTY; users piping input into mise; IDE terminals where the prompt library cannot read confirmation.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- --changed does not accept target arguments
- at least one target or --changed is required
- --source can only be used with one target
- `--mode track` tracks a file where it is and takes no source
- --changed requires trusted configuration: {}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/90ea5d3120372913.
Report an issue: GitHub.