I\'m using the code below to upload a file through Artifactory\'s REST API. My problem is that when I view the file through the GUI I get this message:
@Arnaud Jeansen's answer is good and true. I thought I would share my bash/curl script for deploying with checksums to provide additional details.
This is current as of Artifactory 6.2, and the date of this writing.
# assume test2.zip is the file to upload in current directory
# calculate checksums
sha256=$(openssl dgst -sha256 test2.zip|sed 's/^SHA256.*= //')
sha1=$(openssl dgst -sha1 test2.zip|sed 's/^SHA.*= //')
# upload to Artifactory
curl -u"${ARTIFACTORY_USER}:${ARTIFACTORY_PASSWORD}" \
-sS -T test2.zip \
-H "X-Checksum-Sha256:${sha256}" -H "X-Checksum-Sha1:${sha1}" \
"http://${ARTIFACTORY_HOST}:8081/artifactory/REPO/path/test2.zip" \
> response
jq '.' < response
echo ''
The resultant artifact does not display the warning about checksums in the UI.