{"record":{"id":"1e98b1d5261fd35c","repo":"jdx/mise","slug":"connect-timeout-must-be-greater-than-zero","errorCode":null,"errorMessage":"--connect-timeout must be greater than zero","messagePattern":"--connect-timeout must be greater than zero","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/bootstrap.rs","lineNumber":3036,"sourceCode":"        normalize_adopt_alias(&mut self.adopt, self.from_git.take());\n        crate::ui::ctrlc::exit_on_ctrl_c(false);\n        let relay = crate::github_relay::Scope::from_flags(\n            self.github_relay_read_only,\n            &self.github_relay_repo,\n            self.github_relay_all_repos,\n        )?;\n        let relay = crate::github_relay::configure(\n            relay,\n            self.github_relay_log_requests,\n            self.github_relay_no_log_requests,\n            self.github_relay_log_format.as_deref(),\n            self.github_relay_max_duration.as_deref(),\n        )?;\n        if relay.is_some() && !cfg!(unix) {\n            bail!(\"GitHub relay requires Linux or macOS\");\n        }\n        if self.connect_timeout == 0 {\n            bail!(\"--connect-timeout must be greater than zero\");\n        }\n        let config = Config::get().await?;\n        let config_excludes = system::remote::excludes_from_config(&config);\n        let inventory = system::remote::hosts_from_config(&config, &config_excludes)?;\n        let mut selected = select_remote_inventory(&inventory, &self.targets, self.all, &self.tag)?;\n        let ad_hoc_source = self.source.clone().unwrap_or(std::env::current_dir()?);\n        for destination in &self.host {\n            let host =\n                system::remote::ad_hoc_host(destination, ad_hoc_source.clone(), &config_excludes)?;\n            if selected.insert(host.name.clone(), host).is_some() {\n                bail!(\"remote target '{destination}' was selected more than once\");\n            }\n        }\n        if selected.is_empty() {\n            if inventory.is_empty() {\n                bail!(\n                    \"no remote targets configured; pass --host [user@]host or add [bootstrap.remote.hosts]\"\n                );","sourceCodeStart":3018,"sourceCodeEnd":3054,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/bootstrap.rs#L3018-L3054","documentation":"The `--connect-timeout` option for remote bootstrap must be a positive number of seconds. Zero would mean the SSH/relay connection never gets a timeout budget, so mise validates and rejects it up front.","triggerScenarios":"Running remote bootstrap with `--connect-timeout 0` explicitly supplied.","commonSituations":"Copy-pasted flags from a script where the value is templated to 0; user misunderstanding that 0 means 'no timeout' (it doesn't — use a large positive value instead).","solutions":["Pass a positive value, e.g. --connect-timeout 30","Omit the flag to use the default timeout","Fix templating that substitutes 0 as a sentinel for 'disabled'"],"exampleFix":"// before\nmise bootstrap remote --connect-timeout 0 --all\n// after\nmise bootstrap remote --connect-timeout 30 --all","handlingStrategy":"validation","validationCode":"if (connectTimeout <= 0) throw new Error('--connect-timeout must be > 0')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass positive integer timeouts","Avoid 0 as a 'disable' sentinel; use a large value","Validate templated flag values in scripts before invoking mise"],"tags":["cli","validation","bootstrap","timeout"],"backgroundTag":"invalid-argument-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}