尝试发布工件时出现错误 [英] getting an error while trying to publish an artifact

查看:125
本文介绍了尝试发布工件时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图将我的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

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

I used this link to help me set it up https://www.youtube.com/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=http://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

这篇关于尝试发布工件时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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