Skip to content

Add instructions on disabling keyring #7200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/html/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -791,3 +791,25 @@ of ability. Some examples that you could consider include:

* ``distlib`` - Packaging and distribution utilities (including functions for
interacting with PyPI).


.. _`Disable Keyring`:

Disable Keyring
***************

Keyring in certain cases can prevent the installing of certain packages and modules
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can indicate how a user could recognize if they are impacted by this issue? The language here is a bit vague, perhaps there are some example warnings (maybe they are ResourceWarnings or Exceptions that would indicate if keyring is causing this problem).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default you don't get any output unfortunately. If you increase the verbosity you are going to read something like Getting credentials from keyring for https://pypi.org/simple before it get stuck

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I don't think keyring is mentioned anywhere else in the user guide, maybe before talking about how to turn it off, you could mention that pip doesn't come with keyring but it may try to use it if the user has it installed.

due to authentication errors. In such cases disabling the keyring is recommended.
Keyring can be manually uninstalled but doing so may invalidate other packages that
depends on Keyring.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
depends on Keyring.
depend on Keyring.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
depends on Keyring.
depends on keyring.


There are various ways to disable the keyring. They are:

- Set the password as null to preferred keyring for the relevant URL and username.

- keyring >= 15.1.0 can be disabled via command line using::

keyring --disable

- Set environment variable ``PYTHON_KEYRING_BACKEND`` to
``keyring.backends.null.Keyring`` in a configuration file.
1 change: 1 addition & 0 deletions news/6773.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added documentation on how to disable keyring