-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
When keyring is disabled, poetry tries to use it anyways. #5250
Comments
To be clear, when it fails this way, it fails to do things like it doesn't try and use the environment variable. It just silently ignores it. |
This is a key symptom. I've been very confused as to why my correctly set environment variables for username/password of a private repo are not working. It wasn't until I disabled the keyring (as apparently I'd configured poetry to use it in the past) that I realized that truly the envars were being bypassed. Instead I get prompted for the password when doing
|
I ran in to this same issue today. Looks like a similar check like this needs to be made for "null": |
As a workaround, the "fail" backend can be used: |
Yes, that's what the associated pull request does. 👍 Just waiting on me to have the time to get the unit tests done and I don't know when that will happen. |
Oh sorry, I didn't see there was a PR already. Nice! |
This is genius, helped so much, thank you. |
2023 and this issue still exists and is not fixed. :) |
This issue was fixed with the #5251 and released sometime thereafter. I haven't run into the issue since that point. If you're running into something similar can you double check that you're using a recent enough version so that it includes the fix and if so, please submit details of how to reproduce it, rather than just claiming it still exists? |
I am running into this with 1.4.2 again as well. I just tried to run |
I can't reproduce it: https://gist.github.com/lakinwecker/e85279c2fece8bec211c3608567c4162 Do you have an environment variable for
|
Even with the keyring set, I can't reproduce it. |
Question: why is it trying to access a keyring when installing dependencies? |
I don't really need it at the moment and there is a bug with poetry. python-poetry/poetry#5250 python-poetry/poetry#1917
Because sometimes you might want to access dependencies on an authenticated custom pypi registry? |
It should be clear which dependencies it accesses the keyring for, though. Having a generic prompt to access my keyring by a package manager knowing that I don't use custom pypi registry triggers my safety bells. |
Same problem on wsl2. This has helped (thanks for the advise): export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring |
still present in 1.7.1 :-( |
I just ran into this again and, once more, it took me a while to figure this out, since Can we please at least re-open this ticket and acknowledge this is an issue that needs fixing? |
@radoering From my POV, this doesn't address my concerns, as I still believe keyring should be disabled by default and opt-in for users that actually need it. That solution no different than putting |
Let me help ya'll out with some pseudocode
```
if need_keyring:
ask_for_keyring()
```
…On Wed, 21 Feb 2024 at 09:00, Maciej Gol ***@***.***> wrote:
@radoering <https://github.com/radoering> From my POV, this doesn't
address my concerns, as I still believe keyring should be disabled by
default and opt-in for users that *actually need* it. That solution no
different than putting export
PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring into my .bashrc. But
its a step into good direction, nonetheless.
—
Reply to this email directly, view it on GitHub
<#5250 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMWNEEDVH3UEWI3AQYB7TLYUWZTNAVCNFSM5PSHIM62U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJVGYYTOOJRGE4Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@cal97g nice try, 2/10. Missing tests. |
Why is this issue closed? Spent two days and two developers to figure this out, using
|
It's closed because the original issue has been resolved in #5251. As already mentioned, there are at least two open issues, which fit better for people still experiencing issues with keyring: #8623 and #8761 If you have useful information please comment on these issues or open a new issue if you think that your issue is not covered by them. |
-vvv
option).Issue
If you disable keyring via it's recommended route: https://github.com/jaraco/keyring#disabling-keyring you end up with a "null" keyring being used. This is a useless keyring, but poetry continues to try and use it regardless. poetry should treat it the same as if keyring was unavailable.
The text was updated successfully, but these errors were encountered: