ARTIFACTORY: Why am I getting the “Package does not match the intended download” error?

Andrey Granovsky
2022-05-30 08:48

Artifacts under a version should be immutable. However, in rare cases external remote source artifacts get modified, and yum install may fail for already cached artifacts in the remote-repository-cache in Artifactory and you will observe an error similar to the below:[Error -1] package does not match intended download.
If the remote-repository cache needs to be saved to prevent data loss, it is possible to copy the content of the cache repository to a local repository. The metadata will be calculated by Artifactory and will prevent the issues in resolving the artifacts. It is also possible to use the Artifactory Remote Backup User Plugin to create a backup of the remote-repository-cache.

To resolve the "Package does not match the intended download" error, please use one of the following approaches:

  1. Clearing the remote-repository-cache in Artifactory in case the upstream was changed will resolve the issue, after deletion, an updated package will be downloaded.
  2. Disabling artifact caching, which will use direct repository-to-client streaming.
Please note that this configuration will prevent artifacts from caching locally and each artifact request will be directed to the external resource.