Allow providing the uv auth login password or token via stdin (#15642)

This commit is contained in:
Zanie Blue
2025-09-02 16:59:58 -05:00
committed by GitHub
parent 63b93a1db0
commit f9e98d1fb6
5 changed files with 105 additions and 3 deletions
+11
View File
@@ -15,6 +15,17 @@ This will prompt for the credentials.
The credentials can also be provided using the `--username` and `--password` options, or the
`--token` option for services which use a `__token__` or arbitrary username.
!!! note
We recommend providing the secret via stdin. Use `-` to indicate the value should be read from
stdin, e.g., for `--password`:
```console
$ echo 'my-password' | uv auth login example.com --password -
```
The same pattern can be used with `--token`.
Once credentials are added, uv will use them for packaging operations that require fetching content
from the given service. At this time, only HTTPS Basic authentication is supported. The credentials
will not yet be used for Git requests.