Azure DevOps self-hosted agent is not able to download artifact from Azure Artifacts

3.1k views Asked by At

Azure DevOps Server 2020 with self hosted agents on a different server

I have a build, which is creating an artifact in Azure Artifacts, then a release pipeline is triggered which should download this artifact and do something with it. Previously, the output of a build was on a file share and it work as expected. When I switched to Azure Artifacts - the download artifact task (which is added automatically by Azure DevOps) fails with following:

enter image description here

All other build tasks work on this server without a problem, and also this release pipeline works as expected on other servers. How I can start to troubleshoot this issue as I don't see any meaningful error message?

2

There are 2 answers

1
Kevin Lu-MSFT On BEST ANSWER

According to your screenshot, I could reproduce the similar issue in Azure Devops Server.

enter image description here

But in the task, I could see the error message:

Failed in getBuildApi with error: Error: self signed certificate.

If you have the same issue, you could try the following methods:

1.You could re-config the agent with the self signed certificate.

.\config.cmd --sslcacert ca.pem  xxxx

Here is a ticket about the detailed steps, you could refer to it.

2.You could check if you have set the firewall. Firewalls could block the download of artifacts

3.You could set the system environment :NODE_TLS_REJECT_UNAUTHORIZED=0 and restart the agent services.

0
guderkar On

We had similar problem with self-hosted agents but there was a minor difference - our agents were deployed in vnet.

If that's the case make sure that in vnet's subnet you have enabled Microsoft.Storage service endpoint.

enter image description here

Hope this will save someone tons of time.