[英]GitLab ci unpublish npm package
How to unpublish npm package from the npm package registry in GitLab. How to unpublish npm package from the npm package registry in GitLab. Iam trying to unpublish it in a job in the GitLab pipeline using:我试图在 GitLab 管道中使用以下方法取消发布它:
- npm unpublish --force "@scope/name@1.0.0" --registry https://gitlab.com/api/v4/projects/PR_ID/packages/npm/ --userconfig .npmrc
but it's not working!但它不工作! I don't get any error but the package still exists我没有收到任何错误,但 package 仍然存在
Workaround:解决方法:
curl --header "PRIVATE-TOKEN: YOUR_TOKEN" "https://GITLAB_URL/api/v4/projects/PROJECT_ID/packages?order_by=version&sort=desc"
You will get there the package id你会得到 package id
curl --request DELETE --header "PRIVATE-TOKEN: YOUR_TOKEN" "https://GITLAB_URL/api/v4/projects/PROJECT_ID/packages/PACKAGE_ID"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.