# ERROR: Option '--trusted-host' is not allowed in the pip.conf file. Use the format: trusted-host = pypi.org
files.pythonhosted.org

- **ID:** `pip/pip-conf-option-error`
- **Domain:** pip
- **Category:** config_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

The pip configuration file (pip.conf/pip.ini) contains command-line-style options (e.g., --trusted-host) instead of the correct INI-style key-value format.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 22.3 | active | — | — |
| pip 23.0 | active | — | — |
| pip 23.2 | active | — | — |

## Workarounds

1. **Edit pip.conf to use correct INI format:
[global]
trusted-host = pypi.org
files.pythonhosted.org** (95% success)
   ```
   Edit pip.conf to use correct INI format:
[global]
trusted-host = pypi.org
files.pythonhosted.org
   ```
2. **Remove the offending lines and use environment variables instead: export PIP_TRUSTED_HOST="pypi.org files.pythonhosted.org"** (90% success)
   ```
   Remove the offending lines and use environment variables instead: export PIP_TRUSTED_HOST="pypi.org files.pythonhosted.org"
   ```
3. **Validate config with: pip config list --global (or --user/--site) to see current effective settings.** (85% success)
   ```
   Validate config with: pip config list --global (or --user/--site) to see current effective settings.
   ```

## Dead Ends

- **** — This works temporarily but does not fix the config file; the error persists on next pip command reading the config. (70% fail)
- **** — Still uses the CLI-style prefix; config expects bare key names without dashes. (90% fail)
- **** — Removes the error but also removes all other valid configurations, potentially breaking other settings. (50% fail)
