我在 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']
}
}
}
我的代码有什么问题?感谢你。