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

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

AuthorFullName__c
Andrey Granovsky
articleNumber
000005297
ft:sourceType
Salesforce
FirstPublishedDate
2022-05-30T08:48:10Z
lastModifiedDate
2024-03-10T07:44:26Z
VersionNumber
3

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.