{"record":{"id":"8e08c70c26a4d61e","repo":"astral-sh/uv","slug":"pip-sync-s-config-is-unsupported-uv-does-not","errorCode":null,"errorMessage":"pip-sync's `--config` is unsupported (uv does not use a configuration file)","messagePattern":"pip-sync's `--config` is unsupported \\(uv does not use a configuration file\\)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/uv-cli/src/compat.rs","lineNumber":237,"sourceCode":"            return Err(anyhow!(\n                \"pip-sync's `--python-executable` is unsupported (to install into a separate Python environment, try setting `VIRTUAL_ENV` instead)\"\n            ));\n        }\n\n        if self.user {\n            return Err(anyhow!(\n                \"pip-sync's `--user` is unsupported (use a virtual environment instead)\"\n            ));\n        }\n\n        if self.client_cert.is_some() {\n            return Err(anyhow!(\n                \"pip-sync's `--client-cert` is unsupported (uv doesn't support dedicated client certificates)\"\n            ));\n        }\n\n        if self.config.is_some() {\n            return Err(anyhow!(\n                \"pip-sync's `--config` is unsupported (uv does not use a configuration file)\"\n            ));\n        }\n\n        if self.pip_args.is_some() {\n            return Err(anyhow!(\n                \"pip-sync's `--pip-args` is unsupported (try passing arguments to uv directly)\"\n            ));\n        }\n\n        Ok(())\n    }\n}\n\n#[derive(Debug, Copy, Clone, ValueEnum)]\nenum Resolver {\n    Backtracking,\n    Legacy,","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/astral-sh/uv/blob/f1a42680ff5272232d65748acf338b19778dde24/crates/uv-cli/src/compat.rs#L219-L255","documentation":"pip-sync inherits pip's `--config PATH` for a pip.conf file. uv does not read pip configuration files in any form; its configuration surface is CLI flags, `UV_*` environment variables, and `uv.toml`/`pyproject.toml`. Because silently ignoring a config file would change what gets installed, `PipSyncCompatArgs::validate()` rejects the flag outright.","triggerScenarios":"`uv pip sync --config /etc/pip.conf requirements.txt` in provisioning scripts or Dockerfiles ported from pip-sync.","commonSituations":"Golden images with a global pip.conf for index URLs and credentials; multi-tenant CI runners passing a per-job config file; teams assuming pip-config compatibility because the subcommand is named `pip sync`.","solutions":["Remove `--config` and replicate needed settings in `uv.toml` or `[tool.uv]`.","Supply index/credentials via env (`UV_INDEX_URL`, `UV_INDEX_USERNAME`, `UV_INDEX_PASSWORD`) or `.netrc` where supported.","For per-directory pipelines, place a small `uv.toml` next to each requirements file."],"exampleFix":"# before\nuv pip sync --config /etc/pip-tools.conf requirements.txt\n\n# after\n# uv.toml: index settings + credentials\nuv pip sync requirements.txt","handlingStrategy":"validation","validationCode":"def assert_no_config_flag(argv: list[str]) -> None:\n    if any(a == \"--config\" or a.startswith(\"--config=\") for a in argv):\n        raise ValueError(\"uv does not read config files; use uv.toml, UV_* env vars, or flags\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Port pip.conf contents to uv.toml as part of the migration, not after the first failure.","Keep credentials in env vars or the credential API, never in files only pip reads.","Assert in CI that no `--config` remains in migrated commands."],"tags":["cli","pip-tools","compatibility","sync","configuration"],"backgroundTag":null,"analyzedSha":"f1a42680ff5272232d65748acf338b19778dde24","analyzedAt":"2026-08-16T04:51:47.599Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}