Bug 1859476
| Summary: | pip unusable if fingerprint authentication is enabled: Keyring is skipped due to an exception: Failed to unlock the collection | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dmitry Tantsur <dtantsur> | ||||
| Component: | python-pip | Assignee: | Miro Hrončok <mhroncok> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | urgent | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 32 | CC: | metherid, mhroncok, ncoghlan, python-sig, rkudyba, slavek.kabrda, tflink, TicoTimo, torsava | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | python-pip-19.3.1-4.fc32 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2020-08-26 14:51:40 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Dmitry Tantsur
2020-07-22 08:47:07 UTC
The only workaround I could find is to open /usr/lib/python3.8/site-packages/keyring/core.py and comment out init_backend() in the bottom of the file. I guess the issue here is spread between gnome-keyring, python-keyring and pip, but at the very least pip should NOT try to invoke keyring each time if it failed 2x already. pip does not depend on python3-keyring, but when it is installed, it uses it: See https://github.com/pypa/pip/pull/5952/files However, "WARNING: Keyring is skipped due to an exception: " should be harmless. Maybe this is https://github.com/pypa/pip/issues/7998 ? Dmitry, if I provide you a patched build, would you be able to try it out? Note that I cannot reproduce this bug with the same package versions. Please attach the log generated by:
$ pip install --user -vvv gertty | tee piplog
I've opened https://github.com/pypa/pip/issues/8613 for upstream, because I think that querying the keyring for each pypi URL is not good. Created attachment 1702074 [details] piplog > Dmitry, if I provide you a patched build, would you be able to try it out? Totally > "WARNING: Keyring is skipped due to an exception: " should be harmless. It is, but asking me for a password I don't know is :) It's a whole different story why my keyring password is different from my login password.. Attaching "pip install --user -vvv gertty --ignore-installed 2>&1 | tee ~/piplog". Note that the warning message is different because I've butchered python-keyring. > It is, but asking me for a password I don't know is :) Well, yes. I've showcased this at https://github.com/pypa/pip/issues/8613#issuecomment-662394127 It appears to be a duplicate: https://github.com/pypa/pip/issues/8090 I've proposed a solution to upstream in https://github.com/pypa/pip/pull/8687 Dmitry, please do test a partial workaround. Navigate to https://src.fedoraproject.org/rpms/python-pip/pull-request/70 -- in the right column follow the most recent simple-koji-ci link (there is just one now), follow buildArch (python-pip-19.3.1-4.fc32.src.rpm, noarch) in the middle, and get the python3-pip-19.3.1-4.fc32.noarch.rpm file to install. Currently, that boils down to: $ sudo dnf upgrade https://kojipkgs.fedoraproject.org//work/tasks/5205/49085205/python3-pip-19.3.1-4.fc32.noarch.rpm With this workaround applied, you should be prompted for the keyring password just once per `pip install`. If that is (not) the case, let me know. A more complete fix is not yet ready and might be part of some future pip version (I'm trying to deal with that on upstream side, but there are a lot of places this can make worse, so the approach is cautious. > With this workaround applied, you should be prompted for the keyring password just once per `pip install`
I can confirm this with the provided package, thank you!
FEDORA-2020-5be1350459 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5be1350459 FEDORA-2020-5be1350459 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-5be1350459` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5be1350459 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-5be1350459 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report. |