{"record":{"id":"8b73c419d1117bf4","repo":"Morganamilo/paru","slug":"change-aur-url-schema-from-https-to-ssh-lib","errorCode":null,"errorMessage":"change AUR URL schema from HTTPS to SSH","messagePattern":"change AUR URL schema from HTTPS to SSH","errorType":"panic","errorClass":"panic","httpStatus":null,"severity":"error","filePath":"src/lib.rs","lineNumber":181,"sourceCode":"    if let Some(ref config_path) = config.config_path {\n        let file = read_to_string(config_path)?;\n        let name = config_path.display().to_string();\n        config.parse(Some(name.as_str()), &file)?;\n    };\n\n    if args.is_empty() {\n        config.parse_args([\"-Syu\"])?;\n    } else {\n        config.parse_args(args)?;\n    }\n\n    let aur_url = if config.ssh {\n        config\n            .aur_url\n            .to_string()\n            .replacen(\"https://\", \"ssh://aur@\", 1)\n            .parse()\n            .expect(\"change AUR URL schema from HTTPS to SSH\")\n    } else {\n        config.aur_url.clone()\n    };\n\n    config.fetch = aur_fetch::Fetch {\n        git: config.git_bin.clone().into(),\n        git_flags: config.git_flags.clone(),\n        clone_dir: config.build_dir.clone(),\n        diff_dir: config.cache_dir.join(\"diff\"),\n        aur_url,\n    };\n\n    let mut fetch = config.fetch.clone();\n    fetch.clone_dir = config.build_dir.join(\"repo\");\n    fetch.diff_dir = config.cache_dir.join(\"diff/repo\");\n    config.pkgbuild_repos.fetch = fetch;\n\n    log::debug!(\"{:#?}\", config);","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/lib.rs#L163-L199","documentation":"Same HTTPS-to-SSH URL rewrite as in config.rs, performed on the config during run2 before constructing the fetch backend. The expect panics when replacen(...).parse::<Url>() fails, i.e. the configured aur_url is not a parseable https URL. It is an invariant failure caused by an invalid user configuration.","triggerScenarios":"Running any paru command that reaches run2 with Ssh enabled and an aur_url that is empty, scheme-less, already ssh://, or otherwise not a valid https URL.","commonSituations":"Hand-edited paru.conf with AurUrl set to an ssh URL or a bare hostname; environment where config file was migrated from another AUR helper with a different URL format.","solutions":["Correct aur_url in paru.conf to a full https:// URL such as https://aur.archlinux.org/.","Drop any ssh://aur@ prefix from aur_url; paru applies it automatically when Ssh = true.","Set Ssh = false if you want to keep a non-https URL untouched."],"exampleFix":"// before\nAurUrl = aur.archlinux.org\n// after\nAurUrl = https://aur.archlinux.org/","handlingStrategy":"validation","validationCode":"grep -E '^AurUrl' ~/.config/paru/paru.conf  # must be full https:// URL","typeGuard":"fn is_https_url(s: &str) -> bool { s.starts_with(\"https://\") && url::Url::parse(s).is_ok() }","tryCatchPattern":null,"preventionTips":["Never put ssh://aur@ URLs in AurUrl while Ssh = true","Include the scheme when setting AurUrl","Test config changes with a cheap command like paru -Ssa"],"tags":["config","url","aur","ssh","panic"],"backgroundTag":"invalid-url-format","analyzedSha":"9ac3578807a87858651e81a02586ceb947686e7c","analyzedAt":"2026-09-12T04:57:59.861Z","contentChangedAt":"2026-09-12T04:57:59.861Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}