Grails (3.0.8) 插件 bintrayUpload returns HTTP/1.1 - 禁止

Grails (3.0.8) plugin bintrayUpload returns HTTP/1.1 - forbidden

bintrayUpload 总是尝试将我的插件发布到 grails/plugins 而不是我的 repo danieltribeiro/plugins。因此我得到了 403 禁止。

* What went wrong:
Execution failed for task ':bintrayUpload'.
> Could not create package 'grails/plugins/my-plugin': HTTP/1.1 403 Forbidden [message:forbidden]

我在这里检查了类似问题的答案 and tried all the solutions proposed without lucky. Including the 只是更改了名称并将 userRepo 留空。但无论我做什么,任务都会尝试上传到 grails.plugins 存储库。

我的 bintray 插件是 1.2

plugins {
    id "io.spring.dependency-management" version "0.5.2.RELEASE"
    id "com.jfrog.bintray" version "1.2"
}

我在 Benoit tutorial 之后的 build.gradle 上尝试了很多 bintray 闭包内的配置。我创建了插件 repo,配置了具有正确值的环境变量 BINTRAY_USER 和 BINTRAY_KEY(否则会抛出 401-Unauthorized)

这是我最后一次(不工作)的配置。

version "0.1-SNAPSHOT"
group "danieltribeiro.plugins" // Or your own user/organization

bintray {
  pkg {
    userOrg = 'danieltribeiro' // If you want to publish to an organization
    repo = 'plugins'
    name = "${project.name}"
    //issueTrackerUrl = "https://github.com/benorama/grails-$project.name/issues"
    //vcsUrl = "https://github.com/benorama/grails-$project.name"
    version {
      attributes = ['grails-plugin': "${project.group}:${project.name}"]
      name = project.version
    }
  }
}

为什么这个任务继续 POST 到 grails.plugins?

您可能正在使用:

apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/bintrayPublishing.gradle'

它采用默认的 bintray 配置。

覆盖此配置或对其进行注释并手动执行:

bintray {
    user = 'user'
    key = '*****'
    pkg {    
        userOrg = '' // 
        repo = 'nameRepo'
        licenses = project.hasProperty('license') ? [project.license] :['Apache-2.0']
        name = "$project.name"
        issueTrackerUrl = "yourGitHub"
        vcsUrl = "yourGitHub"
        version {
            attributes = ['grails-plugin': "$project.group:$project.name"]
            name = project.version
        }
    }
}