-
Notifications
You must be signed in to change notification settings - Fork 53
Pass pgp credentials via other mechanisms #102
Conversation
CI fails because of sbt/sbt#3108. |
I've just pushed to see what's going on. After the resolution error went away, I got a weird error: incompatible class version. It seems there are some stale class files that are not correctly cleaned. Let's see if there's more luck now. |
025bee4
to
9dc8087
Compare
Previously, pgp passphrases could not be provided from system properties and environment variables. This commit enables this use case and makes pgp credentials behave in the same way as sonatype credentials do.
I think I've just figured out what happened. Someone push forced to master 2.12, and CI never ran. If it had, it would have failed because Travis uses Oracle JDK7 by default. |
Yes, CI is passing as expected. |
Can you quickly review this @eed3si9n ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I particularly like the more compact encoding (rather than nesting).
Only thing I'd do differently is:
- look in the cache before sys props, like requestSonatypeCredentials
- prompt the user or throw sys.error also in requestPgpCredentials, like requestSonatypeCredentials, rather than do half in requestPgpCredentials and half outside.
Hey Dale, thanks for the feedback. The reason why I didn't use user prompt in this PR is because I'm not interested in making it behave the same as the sonatype credentials. I'm just interested in a programmatic way to pass them to the plugin. This is also the reason why we don't cache them (there is no need to if users cannot type the credentials in). I someone is interested in that feature, I suggest to do it in another PR. Honestly, I'm not convinced that prompting for the gpg password is a good idea at all (I would personally prefer a safer mechanism that involves the connection with |
One of us is confused, because as I see it there is no need to implement user prompt because it's there already. https://github.com/sbt/sbt-bintray/pull/102/files#diff-0c323dc89cc4b703a5896b0640646c9eR107 |
I didn't mean "implement it" but rather use it for pgp credentials. |
Merging since @dwijnand and I agreed privately that we can solve the concerns described in this ticket in the future if the need arises. |
Previously, pgp passphrases could not be provided from system properties
and environment variables. This commit enables this use case and makes
pgp credentials behave in the same way as sonatype credentials do.