Skip to content

Commit da78792

Browse files
authored
docs: clarify configuration source precedence
Add a section to configuration docs that explains precedence among environment variables, local config, global config, and defaults.
1 parent 029685c commit da78792

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

docs/configuration.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ If a setting is defined in both `poetry.toml` (local/project) and `config.toml`
4040
the local/project configuration takes precedence over the global configuration.
4141
{{% /note %}}
4242

43+
## Configuration sources
44+
45+
When a setting is set in multiple places, Poetry applies the following precedence
46+
(from highest to lowest):
47+
48+
1. Environment variables (for example, `POETRY_VIRTUALENVS_CREATE`)
49+
2. The local `poetry.toml` file (created with `poetry config --local`)
50+
3. The global `config.toml` file
51+
4. The setting's default value
52+
53+
For repository credentials (`http-basic.*`, `pypi-token.*`), Poetry may also read
54+
from `auth.toml` and the system keyring. Environment variables still take
55+
precedence over file-based values.
56+
4357
{{% warning %}}
4458
Be mindful when checking in this file into your repository since it may contain user-specific or sensitive information.
4559
{{% /warning %}}

0 commit comments

Comments
 (0)