unearth icon indicating copy to clipboard operation
unearth copied to clipboard

Unable to install packages from Azure's package repository

Open vodik opened this issue 2 years ago • 3 comments

Describe the bug Looks like Azure put their python package index behind an authorization mechanisms that redirects you through a login portal in such a way that this package gets confused. Pip seems to handle this scheme correctly.

unearth: Collecting links from https://pypi.org/simple/some-package/
unearth: Found index url https://pypi.org/simple
unearth: Skip https://pypi.org/simple/some-package/ because of Client Error(404): Not Found.
unearth: Collecting links from https://***@pkgs.dev.azure.com/myorg/core/_packaging/cp/pypi/simple/some-package/
unearth: Found index url https://[email protected]/myorg/core/_packaging/cp/pypi/simple/
unearth: Skip link <Link https://spsprodcca1.vssps.visualstudio.com/go/profile (from https://spsprodcca1.vssps.visualstudio.com/_signin?realm=pkgs.dev.azure.com&reply_to=https%3A%2F%2Fpkgs.dev.azure.com%myorg%2Fcore%2F_packaging%2Fcp%2Fpypi%2Fsimple%some-package%2F&redirect=1&hid=e8463d24-ca16-4e07-aeb8-7434d592857c&context=eyJodCI6MiwiaGlkIjoiOThkZWFmYjYtYmYzZC00YTE5LWFjMjQtZDk0YzY5NjhjYzYyIiwicXMiOnt9LCJyciI6IiIsInZoIjoiIiwiY3YiOiIiLCJjcyI6IiJ90)>: Not a file: profile
unearth: Skip link <Link https://spsprodcca1.vssps.visualstudio.com/_signout (from https://spsprodcca1.vssps.visualstudio.com/_signin?realm=pkgs.dev.azure.com&reply_to=https%3A%2F%2Fpkgs.dev.azure.com%myorg%2Fcore%2F_packaging%2Fcp%2Fpypi%2Fsimple%some-package%2F&redirect=1&hid=e8463d24-ca16-4e07-aeb8-7434d592857c&context=eyJodCI6MiwiaGlkIjoiOThkZWFmYjYtYmYzZC00YTE5LWFjMjQtZDk0YzY5NjhjYzYyIiwicXMiOnt9LCJyciI6IiIsInZoIjoiIiwiY3YiOiIiLCJjcyI6IiJ90)>: Not a file: _signout

To Reproduce Add a source entry like this in pdm:

[[tool.pdm.source]]
url = "https://${TOKEN}@pkgs.dev.azure.com/coherentpath/core/_packaging/cp/pypi/simple/"
verify_ssl = true
name = "azure"

And then adding a package provided by said repository.

System (please complete the following information):

  • unearth version: master
  • Python version: 3.9
  • OS: macOS

vodik avatar Sep 26 '22 01:09 vodik

The credentials are passed via Basic Authentication. Does pip support that use case though?

frostming avatar Oct 06 '22 05:10 frostming

Hi vodik,

I had to use this URL scheme (as listed in the guide):

https://<feedname>:<token>@pkgs.dev.azure.com/<org>/<project>/_packaging/<feedname>/pypi/simple/

I am not using ssl but I don't think it's the issue. I've been downloading packages from Azure index for months with no issues.

inigohidalgo avatar Apr 19 '23 11:04 inigohidalgo

@vodik Can you try on the latest stable version?

frostming avatar Apr 19 '23 11:04 frostming