将工件捆绑包上传到声呐 [英] Upload artifact bundle to sonatype

查看:99
本文介绍了将工件捆绑包上传到声呐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过以下方式将工件捆绑包(jar)上传到 https://oss.sonatype.org curl命令.我遇到网址问题.

I want to upload an artifact bundle(jar) to https://oss.sonatype.org via curl command. I am facing issues with URL.

curl -v -u 'username':'password' --upload-file xyz-version-bundle.jar https://oss.sonatype.org/content/repositories/com/abc/xyz/version/

我已经通过上述curl命令尝试过,并且尝试了URL的多种变体,但仍然得到404 - Repository with ID="com" not found.

I have tried via above curl command and I have tried many variations in URL but still getting 404 - Repository with ID="com" not found.

注意:捆绑包jar文件包含pom等所有文件.我可以通过UI上传同一捆绑包.

Note: The bundle jar file contains all files like pom etc. I am able to upload the same bundle via UI.

推荐答案

这对我有用.

curl -ujorlina2 -u $SONATYPE_USER:$SONATYPE_PASSWORD --request POST -F "file=@xyz-"$VERSION"-bundle.jar" "https://oss.sonatype.org/service/local/staging/bundle_upload"

此处SONATYPE_USERhttps://oss.sonatype.org的用户名,$SONATYPE_PASSWORD是其密码.

Here SONATYPE_USER is the username for https://oss.sonatype.org and $SONATYPE_PASSWORD is the password for same.

这篇关于将工件捆绑包上传到声呐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆