Search code examples
azure-artifacts

Direct download URL for universal package in Azure artifacts


we would like to share a URL pointing to an universal package to our company internal customers. By opening the link the referenced universal package file shall be directly downloaded.

I know that I can use the Azure CLI for achieving the same goal but forcing the people to install and properly configure the Azure CLI only for downloading the package file is not ideal.

Therefore I am interested if there is a way to have a direct download link for a universal package.

Thank you


Solution

  • The answer is No.

    1,If your customers donot have access to your azure devops project.

    The most direct workaround i can think of is to create a azure repo and upload the universal package to this repo. Then create a PAT with only Code-read scope. Then you can share below commands with your customers. They can download the universal package directly with below git command.

    git clone https://{PAT}@dev.azure.com/{Org}/{Proj}/_git/{repoName}

    The PAT created above may have the access to your other azure repos. To create a more secure PAT with access to only one repo, you can refer to this thread Giving a script Git access to a single Azure Repo

    2,If your customers have access to your azure devops project.

    They can use their own credential to git clone the universal package azure repo directly.

    Pulish the universal package to azure pipeline server as build artifacts as Torsten mentioned is workable too. But it is a little complicated. You have to create a pipeline to publish the package and call Get Artifacts rest API to get the download url of the build artifacts. The download url will authenticate Your customers to download the artifacts.(So This is only workable if customers have access to your azure devops project)