0

I want to build an Azure ML environment with two python packages that I have in Azure Devops. For this I need a workspace connection to Azure Devops. One package is published to an artifact feed and I can access it using the python SDK using a personal access token:

ws.set_connection(name="ConnectionName", 
                  category= "PythonFeed", 
                  target = "https://pkgs.dev.azure.com/", 
                  authType = "PAT", 
                  value = PAT_TOKEN)

However, for the other I need to get the package from the git repository in Azure Devops. The documentation of the Python SDK and the underlying REST API don't give the options for the arguments, only that they need to be strings (see links).

My question: what are the options for the following arguments:

  • authType
  • category
  • valueFormat

And what do I need to set for target argument, so that I can connect to the Azure DevOps repository with potentially different authentication?

1 Answers1

0

To get the package from a Azure DevOps git repository you can change the target to the repository URL:

ws.set_connection(
    name="ConnectionName", 
    category = "PythonFeed",
    target = "https://dev.azure.com/<MY-ORG>/<MY-PROJECT>/_git/<MY-REPO>", 
    authType = "PAT", 
    value = <PAT-TOKEN>)

Note here that there is no user specified in the URL (the standard "clone" URL in Azure DevOps also contains "DevOps-Vx@").

As for any other options for "authType", "category" and "valueFormat", I don't know.