voxpupuli / puppet-archive

Compressed archive file download and extraction with native types/providers for Windows and Unix
https://forge.puppet.com/puppet/archive
Apache License 2.0
59 stars 176 forks source link

Artifactory has no authentication for latest url and checksum #489

Open alsar1980 opened 1 year ago

alsar1980 commented 1 year ago

How to reproduce (e.g Puppet code you use)

archive::artifactory { 'example.jar':
  path    => '/tmp/example.jar',
  headers => ["X-JFrog-Art-Api: ${artifactory_authentication}"],
  url     => 'https://jfrog.example.com:443/artifactory/repo/com/example/package-1.0.0-SNAPSHOT/package-1.0.0-SNAPSHOT.jar',
}

What are you seeing

Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, HTTP Error Code 401
URL: https://jfrog.example.com:443/artifactory/repo/com/example/package-1.0.0-SNAPSHOT/package-1.0.0-SNAPSHOT.jar
Content:
{
  "errors" : [ {
    "status" : 401,
    "message" : "Authentication is required"
  } ]
} (file: /.../puppet/modules/archive/manifests/artifactory.pp, line: 93, column: 17) (file: /../puppet/test_jfrog.pp, line: 10) on node test