如何在 Linux 命令行中从 artifactory 获取 MD5 校验和

How to get MD5 checksum from artifactory in Linux command line

我必须从神器中获取 MD5 校验和 link:

www.artifactory_company_link/artifactory/webapp/#/artifacts/browse/tree/General/abc.html

我试过 CURL -I artifactory_link。但是没有得到MD5校验。

要从命令行获取 MD5 校验和,您需要使用 Artifactory File Info REST API.

因此获取文件的 MD5 校验和的正确方法是(假设这里是 General 存储库)

curl -s -u<user>:<password> www.artifactory_company_link/artifactory/api/storage/General/abc.html

这将输出文件信息的大 json 输出,包括其 MD5 校验和。 使用 jq 得到校验和

curl -s -u<user>:<password> www.artifactory_company_link/artifactory/api/storage/General/abc.html | jq ".checksums.md5"