Fix checksum in Artifactory when uploading file through REST API

后端 未结 3 1370
再見小時候
再見小時候 2021-01-04 23:04

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:

3条回答
  •  时光取名叫无心
    2021-01-04 23:22

    I was able to just use the sha1 header and artifactory stopped complaining, here's a bash snippet as example:

    CHECKSUM=sha1sum some.rpm | awk '{ print $1 }' curl -k -umy_user:my_pass -H "X-Checksum-Sha1:$CHECKSUM" -XPUT https://cudgels_are_cool.com/artifactory/some_repo -T some.rpm

提交回复
热议问题