尝试发布工件时出现错误

编程入门 行业动态 更新时间:2024-10-15 22:29:35
本文介绍了尝试发布工件时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正试图将我的android库发布到我的私人仓库中,但是我从android studio中的终端收到此错误:

I'm trying to publish my android library to my private repo but i'm getting this error from the Terminal in android studio :

无法发布构建信息:请求版本时发生错误 信息:未经授权

Could not publish build-info: Error occurred while requesting version information: Unauthorized

这是命令:

gradlew.bat build artifactoryPublish

我使用此链接帮助我进行设置 www.youtube/watch?v = mztbo8WwqRc

I used this link to help me set it up www.youtube/watch?v=mztbo8WwqRc

这是JFrog官方视频

It's an official JFrog video

这就是我添加到项目gradle中的内容:

This is what i added to my project gradle :

artifactory { contextUrl = "${artifactory_contextUrl}" //The base Artifactory URL if not overridden by the publisher/resolver publish { repository { repoKey = 'libs-release-local' username = "${artifactory_user}" password = "${artifactory_password}" maven = true } } resolve { repository { repoKey = 'libs-release' username = "${artifactory_user}" password = "${artifactory_password}" maven = true } } }

这是我的gradle.properties,我在其中放置了用户并通过(从工件中获得了它):

and this is my gradle.properties where i put the user and pass (got it from artifactory):

org.gradle.jvmargs=-Xmx1024m artifactory_user=${security.getCurrentUsername()} artifactory_password=${security.getEncryptedPassword()!"*****what_lookes_like_my_encrypted_password****"} artifactory_contextUrl=10.0.1.4:8081/artifactory org.gradle.java.home=C:\\Program Files\\Java\\jdk1.8.0_162 android.enableAapt2=false

我对Gradle和Artifactory领域并不陌生,所以任何帮助都可以, 有人知道这是怎么回事吗? Tnx!

I'm rather new to the Gradle and Artifactory worlds so any help will do , anyone knows what's wrong here ? Tnx!

推荐答案

这似乎是权限问题.您用于发布的用户至少应具有对目标存储库的部署权限. 您可以在管理>安全性>用户>编辑用户页面中检查用户权限(需要管理员权限)

或在Artifact信息库浏览器中选择一个信息库时,通过查看有效权限"选项卡

This seems to be a permissions issue. The user you are using for publishing should have at least deployment permissions to the target repository. You can check the user permissions in the Admin > Security > Users > Edit User page (requires admin permissions)

Or by looking at the effective permissions tab when selecting a repository in the Artifact Repository Browser

更多推荐

尝试发布工件时出现错误

本文发布于:2023-11-26 22:02:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635377.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工件   出现错误

发布评论

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

>www.elefans.com

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