{"record":{"id":"f3a8356ca4f648fb","repo":"Morganamilo/paru","slug":"change-aur-url-schema-from-https-to-ssh","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/config.rs","lineNumber":754,"sourceCode":"            let rpc_url = match &self.aur_rpc_url {\n                Some(rpc) => rpc.to_string(),\n                None => self.aur_url.join(\"rpc\")?.to_string(),\n            };\n\n            self.raur = raur::Handle::new_with_settings(client, rpc_url);\n        }\n\n        #[cfg(feature = \"mock\")]\n        {\n            self.raur = crate::mock::Mock::new()?;\n        }\n\n        let aur_url = if self.ssh {\n            self.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            self.aur_url.clone()\n        };\n\n        self.fetch = aur_fetch::Fetch {\n            git: self.git_bin.clone().into(),\n            git_flags: self.git_flags.clone(),\n            clone_dir: self.build_dir.clone(),\n            diff_dir: self.cache_dir.join(\"diff\"),\n            aur_url: aur_url.clone(),\n        };\n\n        self.pkgbuild_repos.fetch = aur_fetch::Fetch {\n            git: self.git_bin.clone().into(),\n            git_flags: self.git_flags.clone(),\n            clone_dir: self.build_dir.join(\"repo\"),\n            diff_dir: self.cache_dir.join(\"repo/diff\"),\n            aur_url,","sourceCodeStart":736,"sourceCodeEnd":772,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/config.rs#L736-L772","documentation":"When ssh mode is enabled, the configured https:// AUR URL is rewritten to ssh://aur@... and re-parsed into a Url. The expect fires when the rewritten string fails to parse as a valid URL. Given a valid https URL the replacement always parses, so this is an internal invariant: the configured aur_url was not a normal https:// URL to begin with.","triggerScenarios":"Setting aur_url in paru.conf to something that is not a well-formed https:// URL (missing scheme, ssh:// already, typo, trailing junk) and then enabling the Ssh option.","commonSituations":"Users copy-pasting an ssh://aur@aur.archlinux.org/... URL into aur_url while also enabling ssh mode, causing double rewriting; typos or custom AUR mirrors with unusual schemes.","solutions":["Set aur_url in paru.conf to a plain https:// URL, e.g. https://aur.archlinux.org/.","Remove ssh://aur@ prefix from aur_url if you already put it there; paru adds it when Ssh = true.","Disable the Ssh option if you intentionally want to use an ssh URL directly."],"exampleFix":"// before (paru.conf)\nAurUrl = ssh://aur@aur.archlinux.org/\nSsh = true\n// after\nAurUrl = https://aur.archlinux.org/\nSsh = true","handlingStrategy":"validation","validationCode":"grep -E '^AurUrl' ~/.config/paru/paru.conf  # must start with https://","typeGuard":"fn is_https_url(s: &str) -> bool { s.starts_with(\"https://\") && url::Url::parse(s).is_ok() }","tryCatchPattern":null,"preventionTips":["Always keep AurUrl as a plain https:// URL in paru.conf","Let the Ssh option add the ssh://aur@ prefix itself","Validate paru.conf after edits with a quick paru -G dry run"],"tags":["config","url","aur","ssh"],"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"}