我正在尝试将我的Android库发布到我的私人仓库,但我从android工作室的终端中收到此错误:
无法发布build-info:请求版本时出错 信息:未经授权
这是命令:
gradlew.bat build artifactoryPublish
我使用此链接来帮助我设置https://www.youtube.com/watch?v=mztbo8WwqRc
这是官方的JFrog视频
这是我添加到项目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,我把用户和传递(从神器中获取):
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!