Skip to content

Commit

Permalink
Merge pull request #11592 from judahrand/keyring-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg authored Jan 28, 2023
2 parents b5be1da + 89a4a35 commit fc747ca
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions docs/html/topics/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,21 @@ man pages][netrc-docs].
pip supports loading credentials stored in your keyring using the
{pypi}`keyring` library.

pip will first try to use `keyring` in the same environment as itself and
fallback to using any `keyring` installation which is available on `PATH`.

Therefore, either of the following setups will work:

```bash
$ pip install keyring # install keyring from PyPI into same environment as pip
$ echo "your-password" | keyring set pypi.company.com your-username
$ pip install your-package --index-url https://pypi.company.com/
```

or

```bash
$ pip install keyring # install keyring from PyPI
$ pipx install keyring # install keyring from PyPI into standalone environment
$ echo "your-password" | keyring set pypi.company.com your-username
$ pip install your-package --index-url https://pypi.company.com/
```
Expand All @@ -79,5 +92,4 @@ pip. This can create a bootstrapping issue if you need the credentials stored in
the keyring to download and install keyring.

It is, thus, expected that users that wish to use pip's keyring support have
some mechanism for downloading and installing {pypi}`keyring` in their Python
environment.
some mechanism for downloading and installing {pypi}`keyring`.

0 comments on commit fc747ca

Please sign in to comment.