Skip to content

Commit 3bc6eed

Browse files
committed
Add documentation
1 parent d4db1d9 commit 3bc6eed

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

docs/html/topics/authentication.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,39 @@ man pages][netrc-docs].
6666
## Keyring Support
6767

6868
pip supports loading credentials stored in your keyring using the
69-
{pypi}`keyring` library.
69+
{pypi}`keyring-subprocess` library.
70+
71+
```{note}
72+
In the previous versions Pip would import {pypi}`keyring` from its environment.
73+
Now Pip vendors `keyring` and `keyring-subprocess`. Pip will query a
74+
`keyring-subprocess` executable if it can be found on the PATH.
75+
76+
This should make bootstrapping virtualenvs easier. The `virtualenv` library has
77+
a mechanism to seed (pre install) packages into new virtualenvs, but Python's
78+
venv module does not.
79+
80+
The upside of vendoring keyring this way is that is will work for both flavours
81+
of virtualenvs.
82+
83+
The downside is that this is a breaking change for existing `keyring` users,
84+
they now need to opt in by installing `keyring-subprocess[landmark]`.
85+
```
7086

7187
```bash
72-
$ pip install keyring # install keyring from PyPI
88+
$ # install keyring-subprocess[landmark] and make it available on the PATH
89+
$ # and possibly additional keyring backends such
90+
$ # - artifacts-keyring for Azure DevOps
91+
$ # - keyrings.google-artifactregistry-auth for Google Artifact Registry
7392
$ echo "your-password" | keyring set pypi.company.com your-username
7493
$ pip install your-package --index-url https://pypi.company.com/
7594
```
7695

77-
Note that `keyring` (the Python package) needs to be installed separately from
78-
pip. This can create a bootstrapping issue if you need the credentials stored in
79-
the keyring to download and install keyring.
96+
Note that `keyring-subprocess[landmark]` (the Python package) needs to be
97+
installed separately from pip. This can create a bootstrapping issue if you
98+
need the credentials stored in the keyring to download and install keyring.
8099

81100
It is, thus, expected that users that wish to use pip's keyring support have
82-
some mechanism for downloading and installing {pypi}`keyring` in their Python
83-
environment.
101+
some mechanism for downloading and installing `keyring-subprocess[landmark]`.
102+
There is a powershell script for Windows on the {pypi}`keyring-subprocess`
103+
project page to install pipx and then install it with pipx. It should be able
104+
to serve as a handy cheat sheet for other platforms.

0 commit comments

Comments
 (0)