Skip to content

Unable to redirect to a GCP Artifact Registry Python repository with pip #40

@miguelnmiranda

Description

@miguelnmiranda

Related to #29

Description

When following redirects that don't point to one of the configured indexes pip will request credentials from the keyrings using the netloc taken from the target's location url (ref).

The present implementation relies on urlib.urlparse to determine hostname (which is part of netloc). urlparse requires urls to have a schema (or at least //) in order to detect a netloc (ref), which makes it misclassify a previously parsed netloc as a path (ref).

I proposed falling back to using the service as is when a hostname cannot be found (ex. when service is just a url's netloc).

Example

Using a private pypi server that redirects to a GCP Artifact Registry Python repository for certain dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions