erlef / rebar3_hex

Rebar3 Hex library
Apache License 2.0
101 stars 49 forks source link

Publishing using an unauthorized user crashes #150

Closed eproxus closed 4 years ago

eproxus commented 4 years ago

Publishing using an unauthorized user crashes:

...
Be aware, you are publishing to the public Hexpm repository.
Before publishing, please read Hex CoC: https://hex.pm/policies/codeofconduct
Proceed? ("Y")> y
Local Password:
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: {case_clause,
                                {ok,{403, ...
starbelly commented 4 years ago

Yeah, definitely shouldn't make it that far. Will look into this ASAP.

starbelly commented 4 years ago

@eproxus I just tried to replicate this but was met with the expected behavior:

===> No write key found for user. Be sure to authenticate first with: rebar3 hex user auth

Can you give steps to reproduce?

eproxus commented 4 years ago

I get that message too when I'm not authorized at all. However, this error comes from being logged in as a different user that doesn't have permissions. Did you try that?

I guess "unauthorized user" wasn't very clear 😄

starbelly commented 4 years ago

@eproxus Ahh yeah, that makes sense. Let me give this a go in a bit..

starbelly commented 4 years ago

@eproxus Replicated, patch opened, just need to add a test then get it out the door 👍