[英]GitLab CI-Build Artifacts command line download
GitLab版本-11.8.1,並嘗試在Ubuntu -14.04-LTS系統的終端上下載CI-Build工件zip文件。
使用以下命令
curl -XGET --header "PRIVATE-TOKEN:avxa_afdfouqernadfg" -o artifacts.zip https://gitlab.com/api/v4/projects/78/builds/artifacts/master/download?job=ci-build
命令成功完成,但是在解壓縮artifacts.zip文件時出現以下錯誤。
Archive: artifacts.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of artifacts.zip or
artifacts.zip.zip, and cannot find artifacts.zip.ZIP, period.
您的網址有誤。 應該是工作而不是建築 :
curl -X GET --header "PRIVATE-TOKEN:avxa_afdfouqernadfg" -o artifacts.zip "https://gitlab.com/api/v4/projects/78/jobs/artifacts/master/download?job=ci-build"
我還建議在您的curl調用中添加-v
,這樣您將看到一個錯誤: HTTP/1.1 404 Not Found
。
請參閱: https : //docs.gitlab.com/ee/api/jobs.html#download-the-artifacts-archive
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.