Skip to content
Merged
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
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,21 @@ The following is a complete transcript for installing keyring on a Ubuntu 18:04
>>> keyring.get_password("system", "username")
'password'

Using Keyring with tox
======================

Some backends rely on environment variables to operate correctly, and ``tox`` filters most environment variables by default.

For example, when using Keyring to store credentials for pip, one may encounter the following error when
running tests under ``tox`` when using a backend reliant on D-Bus:

RuntimeError: No recommended backend was available. Install the keyrings.alt package if you want to use the non-recommended backends. See README.rst for details.

This error is caused by Keyring KWallet backend not able to resolve the backing service.

To work around the issue, add ``DBUS_SESSION_BUS_ADDRESS`` to ``pass_env`` in the
``tox`` configuration. Consider adding other necessary variables, such as ``DISPLAY`` and ``WAYLAND_DISPLAY`` (if using ``pinentry``).

Integration
===========

Expand Down