[英]How to automate release and staging phases with token using Jenkins and Artifactory?
我想在 jenkins 工作中自動化 Artifactory 發布和暫存。
我得到了這個 curl 命令,
curl -X GET "http://localhost:9090/job/artifactory-8.0-release/artifactory/staging?
它工作正常,但它要求進行身份驗證。 當我做自動化時,我只需要使用令牌而不是用戶憑據來調用它。
請幫忙。
有幾種方法可以使用令牌進行身份驗證。
基本認證
curl -u<USERNAME>:<TOKEN> http://ARTIFACTORY_URL/api/system/ping
授權頭
curl -H"Authorization: Bearer <TOKEN>" http://ARTIFACTORY_URL/api/system/ping
來源:JFrog Artifactory 文檔頁面“訪問令牌”
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.