将包发布到由组织创建的bintray(publish a package to bintray which created by an organization)

编程入门 行业动态 更新时间:2024-10-26 13:19:27
将包发布到由组织创建的bintray(publish a package to bintray which created by an organization)

我在bintray创建了一个组织。 当我尝试使用gradle-bintray-plugin将文件发布到属于组织的存储库时。 我遇到了一个问题:

HTTP/1.1 401 Unauthorized [message:This resource requires authentication]

这是我在build.gradle代码:

apply plugin: 'com.jfrog.bintray' publishing { publications { MyPublication(MavenPublication) { groupId 'test.humbleadmin' artifactId 'm-example' artifact androidJar version version } } } bintray { user = 'my_bintray_username' key = 'my_bintray_key' publications = ['MyPublication'] pkg { repo = 'repos_name' name = 'pkage_name' userOrg = 'my_org_name' licenses = ['MIT'] labels = ['gear', 'gore', 'gorilla'] publicDownloadNumbers = true attributes= [name: 'value'] //Optional package-level attributes version { name = '1.0' desc = 'TestMaven Example 1.1.0 final' vcsTag = '1.0' attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin'] } } }

我的代码出了什么问题? 谢谢你。

i have created a organization in bintray. when i try publishing files to the repository belong to the organization using gradle-bintray-plugin. i got a problem:

HTTP/1.1 401 Unauthorized [message:This resource requires authentication]

here is my code in build.gradle:

apply plugin: 'com.jfrog.bintray' publishing { publications { MyPublication(MavenPublication) { groupId 'test.humbleadmin' artifactId 'm-example' artifact androidJar version version } } } bintray { user = 'my_bintray_username' key = 'my_bintray_key' publications = ['MyPublication'] pkg { repo = 'repos_name' name = 'pkage_name' userOrg = 'my_org_name' licenses = ['MIT'] labels = ['gear', 'gore', 'gorilla'] publicDownloadNumbers = true attributes= [name: 'value'] //Optional package-level attributes version { name = '1.0' desc = 'TestMaven Example 1.1.0 final' vcsTag = '1.0' attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin'] } } }

what's wrong with my code? Thank u.

最满意答案

确保API密钥和用户名正确无误。 如果可以,尝试使用组织所有者和他的API密钥进行访问。

如果它没有帮助,尝试使用Curl对Bintray进行操作,您可以使用REST文档: https ://bintray.com/docs/api/。 看到你有权限。

Make sure that the API key and the user name is correct. Try to access with the organization owner and his API key, if you can.

If it doesn't help, try to operate on Bintray with Curl, you can use the REST doc: https://bintray.com/docs/api/. See that you have permissions.

更多推荐

本文发布于:2023-07-31 01:10:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1340436.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:组织   bintray   publish   organization   created

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!