Codearte / gradle-nexus-staging-plugin

Automatize releasing Gradle projects to Maven Central.
Apache License 2.0
172 stars 26 forks source link

Detect credentials not being set #153

Open szpak opened 4 years ago

szpak commented 4 years ago

Recently there were a few cases with 401 Unathorized. While there is more than one reason to get that error, quite often it seemed to be just a problem with settings the credentials in the CI server (and reading them in Gradle) - which currently is quite hard do diagnoze remotly with just --info enabled. It could be useful to detect if username and/or password is not set. For non-local system it is rather not a common situation to have an anonymous access for releasing packages.

Plugin could display what username is used (at INFO) and warn (at the WARN or only at the INFO level?) about suspiciously not set credentials. It has to be done in the way to do not disclose sensitive information.