Skip to content

Commit bfddd72

Browse files
Add UV_NATIVE_TLS environment variable (#2412)
Closes #2409.
1 parent 7964bfb commit bfddd72

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ uv accepts the following command-line arguments as environment variables:
403403
will use the first Python interpreter found in the system `PATH`.
404404
WARNING: `UV_SYSTEM_PYTHON=true` is intended for use in continuous integration (CI) environments and
405405
should be used with caution, as it can modify the system Python installation.
406+
- `UV_NATIVE_TLS`: Equivalent to the `--native-tls` command-line argument. If set to `true`, uv
407+
will use the system's trust store instead of the bundled `webpki-roots` crate.
406408

407409
In each case, the corresponding command-line argument takes precedence over an environment variable.
408410

@@ -432,7 +434,7 @@ performance (especially on macOS, where reading the system trust store incurs a
432434
However, in some cases, you may want to use the platform's native certificate store, especially if
433435
you're relying on a corporate trust root (e.g., for a mandatory proxy) that's included in your
434436
system's certificate store. To instruct uv to use the system's trust store, run uv with the
435-
`--native-tls` command-line flag.
437+
`--native-tls` command-line flag, or set the `UV_NATIVE_TLS` environment variable to `true`.
436438

437439
If a direct path to the certificate is required (e.g., in CI), set the `SSL_CERT_FILE` environment
438440
variable to the path of the certificate bundle, to instruct uv to use that file instead of the

crates/uv/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ struct Cli {
9797
/// However, in some cases, you may want to use the platform's native certificate store,
9898
/// especially if you're relying on a corporate trust root (e.g., for a mandatory proxy) that's
9999
/// included in your system's certificate store.
100-
#[arg(global = true, long)]
100+
#[arg(global = true, long, env = "UV_NATIVE_TLS")]
101101
native_tls: bool,
102102

103103
#[command(flatten)]

0 commit comments

Comments
 (0)