1
votes

I created a new artifact feed from a public open source project that is already being used to perform Azure Pipelines public CI on a repo hosted on github.

I successfully uploaded a bunch of test Python wheel files to that feed using twine and the appropriate credentials.

The generated pip feed URL looks as follows:

https://pkgs.dev.azure.com/orgname/publicprojectname/_packaging/feedname/pypi/simple/

If I type the "pypi"/"pip" URL of the feed in the browser where I am logged in, I get the following message:

This functionality is currently not available.

If I type the same URL in a new "private browsing" window on firefox, I get redirected to the Azure login page.

My end goal would be to share nightly builds and I do not want to use the main pypi.org server for that.

Note: this official tutorial mentions a specific button named "+ New public feed (preview)" to create the feed but I could not find it on my project. I used the regular "+ New feed" button instead. Maybe this is the cause of the problem?

1

1 Answers

3
votes

Even if the URL cannot be browsed from a regular browser, pointing pip to use it with the following command works as expected:

pip install -i https://pkgs.dev.azure.com/orgname/publicprojectname/_packaging/feedname/pypi/simple/ packagename 

To list the content of feed, anonymous users can use a different URL:

https://dev.azure.com/orgname/publicprojectname/_packaging?_a=feed&feed=feedname

Side note: make sure you do not have artifacts-keyring package installed in the venv you use to test anonymous pip access:

pip uninstall -y artifacts-keyring

Otherwise trying to access you feed from pip will trigger the following credential pause:

$ pip install -i https://pkgs.dev.azure.com/orgname/publicprojectname/_packaging/feedname/pypi/simple/ packagename
Looking in indexes: hhttps://pkgs.dev.azure.com/orgname/publicprojectname/_packaging/feedname/pypi/simple/
[Minimal] [CredentialProvider]DeviceFlow: https://pkgs.dev.azure.com/orgname/publicprojectname/_packaging/feedname/pypi/simple/
[Minimal] [CredentialProvider]ATTENTION: User interaction required. 

    **********************************************************************

    To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XXXXXXXX to authenticate.

    **********************************************************************

[Error] [CredentialProvider]Device flow authentication failed. User was presented with device flow, but didn't react within 90 seconds.