Skip to content

Commit 2dca96d

Browse files
mitre88radoering
authored andcommitted
docs: move Configuration Sources section after env vars, add link to Repositories docs
Address review feedback from @radoering: - Move 'Configuration sources' section after 'Using environment variables' - Move warning back under 'Local configuration' - Add link to Repositories docs for auth.toml/keyring details
1 parent e78df63 commit 2dca96d

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

docs/configuration.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,6 @@ 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-
5743
{{% warning %}}
5844
Be mindful when checking in this file into your repository since it may contain user-specific or sensitive information.
5945
{{% /warning %}}
@@ -133,6 +119,20 @@ This also works for secret settings, like credentials:
133119
export POETRY_HTTP_BASIC_MY_REPOSITORY_PASSWORD=secret
134120
```
135121

122+
## Configuration sources
123+
124+
When a setting is set in multiple places, Poetry applies the following precedence
125+
(from highest to lowest):
126+
127+
1. Environment variables (for example, `POETRY_VIRTUALENVS_CREATE`)
128+
2. The local `poetry.toml` file (created with `poetry config --local`)
129+
3. The global `config.toml` file
130+
4. The setting's default value
131+
132+
For repository credentials (`http-basic.*`, `pypi-token.*`), Poetry may also read
133+
from `auth.toml` and the system keyring (for details see [Repositories]({{< relref "repositories" >}})).
134+
Environment variables still take precedence over file-based values.
135+
136136
## Migrate outdated configs
137137

138138
If Poetry renames or remove config options it might be necessary to migrate explicit set options. This is possible

0 commit comments

Comments
 (0)