-
Notifications
You must be signed in to change notification settings - Fork 62
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
Problems authenticating to a private index #742
Comments
Thanks for the report @fgsalomon! And thanks for filling out the full template, I greatly appreciate it. I'm looking into this now -- |
Current operating theory: we added I think what we need to do here is pass @fgsalomon can you confirm that |
Additional |
Yes, |
Thanks @fgsalomon! I've opened #743 as a prospective fix -- could you give the changes on that branch a try and see if they resolve the issue for you? If so, I'll get them merged and do a patch release ASAP. |
It didn't work, I got the same error. I've put a print to see the pip command output:
|
Thanks for checking! Hmm, that's pretty weird -- it looks like
I think that should be fine -- FWICT from the |
I think the problem is that when calling Looking at pip's code it seems that if the |
Hmm, could you try And if that doesn't work, can you try these URLs?
I don't expect those to work, but those are semi standard ways to pass an empty-but-explicit username in a URL. Taking a step back: if we can't get this to work via the
|
None of these worked 😞
Using Google Artifact Registry also requires to install
I thought pip-audit was creating a new virtual env, would this import work? |
Dang. Just to confirm:
Yeah, unfortunately I think that makes this non-workable for us.
Nope, probably not now that I think about it 😞. Okay, unfortunately I think I'm out of ideas here. To fix this on our end, we probably need one of two things:
In the mean time, I think #743 will fix some use cases, but not this one unfortunately. So I'm going to merge there, and also write up some docs that link to this issue until we have a real fix here. |
To me the first option makes more sense since there are backends that don't need the username.
Great. Thanks for your help @woodruffw ! |
No problem, happy to help! And thank you again for your detailed report and triage efforts! |
JFYI: I've updated #743 to also include a troubleshooting section that links to this issue. We'll keep the issue open as well 🙂 |
FYI: I'd the chance to test this again and using |
No problem, happy to hear it's working! I'll update the troubleshooting with that info as well. |
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Pre-submission checks
Expected behavior
Hi,
I have a project with a dependency on a package hosted in a private index. The private index is a Google Artifact Registry.
This project uses a
requirements.txt
file to handle the dependencies.I'm authenticating through the keyring with the Google Artifact Registry backend. I'm authenticated and have the right permissions in Google Cloud.
I can install my private package without issue by providing the extra index url:
However, when I run pip-audit with --extra-index-url it can't find the package:
I expected pip-audit to be able to analyze the dependencies (at least the public ones)
Actual behavior
pip-audit returns an error because it could not find the private package
Reproduction steps
requirements.txt
file with a package hosted in a Google Artifact Registry with a correct setup of the keyringpip-audit -vvvv --extra-index-url MY_INDEX_URL -r requirements/requirements.txt
Logs
Additional context
No response
OS name, version, and architecture
Mac OS 14.2.1 Apple Silicon & Ubuntu 22.04 x86_64
pip-audit version
2.7.1
pip version
24.0
Python version
3.11
The text was updated successfully, but these errors were encountered: