Skip to content
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

Fix fetch of credentials when cache is seeded with username #3206

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Apr 23, 2024

Fixes the failure to lookup credentials in #3205

The issue is that we seed the cache with the index URL which includes a username but no password. We did not ensure that a password was present in the cached credentials before attempting a request with them. Now, the cache will not return credentials when a username is provided and the cached credentials have no password — the cached credentials are useless in that case.

Tested with a Google Artifact Registry and keyring

RUST_LOG=uv=trace cargo run -q -- pip install requests --index-url https://[email protected]/<project>/pypi/simple/ --no-cache --keyring-provider subprocess -v

@jenshnielsen
Copy link

@zanieb I can confirm that this restores the behaviour of 0.1.35 for Azure artifacts.

Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

I buy what you're selling.

@zanieb zanieb merged commit 598a67c into main Apr 23, 2024
39 checks passed
@zanieb zanieb deleted the zb/fix-fetch branch April 23, 2024 14:02
@zanieb zanieb mentioned this pull request Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants