erlef / rebar3_hex

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

Got confused by rebar3 hex user auth #77

Closed ksallberg closed 5 years ago

ksallberg commented 6 years ago

I have a user and I tried to publish something on my new computer, and got the error no user registered:

kristiansallberg@Kristians-Mac-mini.local:~/Documents/brunhilde$ rebar3 hex publish ^[[A===> Verifying dependencies... ===> Upgrading erlydtl ({pkg,<<"erlydtl">>,<<"0.12.0">>, <<"CCD18010AE38444CE292379988EF5973B58C4505FEADD787242D1505AA999788">>}) ===> Downloaded package, caching at /Users/kristiansallberg/.cache/rebar3/hex/default/packages/erlydtl-0.12.0.tar ===> No user registered. See https://hex.pm/docs/rebar3_publish for instructions.

So I thought, okay I need to register.

`kristiansallberg@Kristians-Mac-mini.local:~/Documents/brunhilde$ rebar3 hex user register By registering an account on Hex.pm you accept all our policies and terms of service found at https://hex.pm/policies

Username: ([])> my user Email: ([])> mail Password: Password (confirm): Registering... Registration of user ... failed (401)`

So I should have used used "rebar3 hex user auth" instead.

hex user [register|whoami|auth|deauth|reset_password]

Maybe we can make the first error message say you can either register or auth? Maybe the second error message can say that the user you tried to register already exists, you need to auth.

tsloughter commented 6 years ago

@ksallberg agreed, those would be great changes to help the UX.