【发布时间】:2023-02-11 20:45:37
【问题描述】:
我有一个容器参数,我想在运行 curl 命令期间使用此参数。我像下面这样使用,但它给出了一个错误。对此有什么想法吗?我在 bash 脚本中使用它。
curl -X 'GET' 'https://mycontainer/api/v2.0/projects/testproject/repositories/$(container)/artifacts?page=1&page_size=1&with_tag=true&with_label=false&with_scan_overview=false&with_signature=false&with_immutable_status=false&with_accessory=false' -H 'accept: application/json' -H 'X-Accept-Vulnerabilities: application/vnd.security.vulnerability.report; version=1.1, application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0' -H 'authorization: Basic YWhtZXQuY2Fua2F5YUBucy5ubDo2MkVEbDIxUEM=' | jq '.[].tags[].name' > output2.txt
【问题讨论】: