azure-devopsnugetartifactoryjfrog-cli

Azure DevOps - JFrogNuget Error - Error occurred while executing task: Error: Command failed


My problem is similar to the one discussed in Error in jfrog-cli : The following error was received while trying to encrypt your password: Artifactory response: 404 404. however, i am using JFrog Cli V2 within Azure DevOps.

I have setup an artefact repository in Artifactory and I am using the JFrogNuGet to push a nuget in the the repository. full version of the task is below,

- task: JFrogNuGet@1
  inputs:
    command: 'push'
    artifactoryConnection: 'JFrog Trial'
    targetDeployRepo: 'MYREPO'
    targetDeployPath: '/'
    pathToNupkg: '$(Build.ArtifactStagingDirectory)/*.nupkg'

I am receiving the following error,

15:33:51 [Warn] (Attempt 1) - Failure occurred while sending GET request to https://artifactory.ORG.com/artifactory/api/security/encryptedPassword: Get "https://artifactory.ORG.com/artifactory/api/security/encryptedPassword": dial tcp: lookup artifactory.ORG.com on 127.0.0.53:53: no such host
15:33:51 [Info] executor timeout after 0 attempts with 0 milliseconds wait intervals
15:33:51 [Error] The following error was received while trying to encrypt your password: Get "https://artifactory.ORG.com/artifactory/api/security/encryptedPassword": dial tcp: lookup artifactory.ORG.com on 127.0.0.53:53: no such host
##[error]Error occurred while executing task: Error: Command failed: /opt/hostedtoolcache/jf/2.56.1/x64/jf c add "Antifactory-Test_20240624.3_nuget_deployer_1719243231436" --artifactory-url="https://artifactory.ORG.com/artifactory" --interactive=false --user='***' --basic-auth-only --password-stdin

I do not have access to user and password parameter for the service connection therefore i cannot use the solution mentioned in the above link.

I tried the below step with no luck before the Nuget Task. i get the same error for this task as well.

 - task: JfrogCliV2@1
   inputs:
     jfrogPlatformConnection: 'My-Connection'
     command: 'jf config add artifactory-server --artifactory-url="https://ORG.hiscox.com"'

Solution

  • I tested the JFrogNuGet@1 task in my pipeline with the Microsoft hosted agent, and it works without error.

    Your issue is different from the question discussed in the one you mentioned. That one is a 404 error. But your error is dial tcp: lookup artifactory.ORG.com on 127.0.0.53:53: no such host.

    This error indicates that the system is unable to resolve the hostname artifactory.ORG.com to an IP address. It seems a network issue. You can check your Network or Firewall settings on the agent you run the pipeline.

    You can also try to use the Microsoft hosted agent.