Search code examples
azure-artifactsazure-devops-server-2020

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


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?


Solution

  • 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.