nexus - 如何通过curl将jar发布到nexus?
问题描述
curl -v -u admin:admin123 --upload-file abclog.jar http://111.111.1.121:8081/nexus/content/repositories/releases/com/keshri/fileupload/
解决方案
这适用于nexus 3.12(从windows,上传一个nuget包)
$curl.exe" -u ${NUGET_DEPLOYER_USER}:${NUGET_DEPLOYER_PASS} -F filename=the_artifact.nupkg
http://mynexus.example.org:9881/nexus/service/extdirect -F file=c:\\fakepath\\the_artifact.nupkg
-F repositoryName=nuget-hosted -F extTID=36 -F extAction=coreui_Upload
-F extMethod=doUpload -F extType=rpc -F extUpload=true
在 3.14 上,由于缺少 csrf 令牌而失败。
推荐阅读
- java - 为什么 GUI 需要这么长时间才能显示出来?
- javascript - Chrome 扩展,将局部变量限定在函数内部(来自 backgound.js)并在全局范围内(或在 popup.js 中)使用它。
- linux - 什么是“内核地址空间”?
- java - java.nio.DirectByteBuffer 到字符串而不复制
- ios - 在 iOS 11 上找不到项目 IAP
- python - 我应该在 Python 中腌制素数以产生素数吗?
- sml - 获取错误未绑定变量或构造函数
- css - 在 ul 中垂直居中活动 li
- http - 418“我是茶壶”真的是HTTP响应码吗?
- c# - UWP ColorPicker 使用 Binding 在工作表之间传输颜色