首页 > 解决方案 > 如何通过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

解决方案


这适用于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 令牌而失败。


推荐阅读