I develop a number of plugins as part of my work on Hibernate. I’d like to share the ability to publish these with other team members. They say they are not able to publish:
The user 'xyz' does not have write permissions to plugin [my.plugin.name]
Is there something I need to do allow others to publish?
Unfortunately, we don’t have a way to grant other users permission to publish plugins.
As a workaround, you could create a shared account and we can transfer the ownership of the plugin to that account. Just let us know if you’d like to do that.
I’ll create a user to which to transfer ownership. I do need the ability to create a user whose email address does not show up though. Is that possible?
Relatedly, based on the way the API keys are used (“unscoped” in ~/.gradle/gradle.properties), it seems like its not very easy to have the ability to publish plugins under 2 different portal users. E.g. I develop some plugins that I want under the “Hibernate umbrella”, but I also develop some plugins that should be published still under my personal user. As far as I can see, that means opening ~/.gradle/gradle.properties every time and changing gradle.publish.key and gradle.publish.secret every time I need to publish a plugin. Am I missing something there?
Updated the link above. Apparently GitHub mobile app handles the link slight differently, so I don’t think you would have seen the template option in a normal browser.
You can configure different properties for this as long as you get them to the correct location by the time the publish tasks run. From the plugin publishing docs:
It is common practice to copy and paste the text into your $HOME/.gradle/gradle.properties file, but you can also place it in any other valid location. All that the plugin requires is that gradle.publish.key and gradle.publish.secret are available as project properties when the appropriate Plugin Portal tasks are executed.
It technically will change things a little bit for everyone you want to share with, but I think that’s actually a good thing so that no one accidentally publishes a non-Hibernate project with the Hibernate shared credentials.
Put something like this in your build.gradle and tell your publishers to set those values as hibernate.gradle.publish.key and hibernate.gradle.publish.secret instead: