Closed waisbrot closed 8 years ago
Is this a supported hex thing? I don't see it in the elixir client?
We call it hex.user auth
in mix. https://hex.pm/docs/tasks#hex_user
I think rebar3 hex user auth
is the equivalent of mix hex.user auth
.
This makes the same API call as both of those commands, but for a different purpose. Instead of storing the token in your local config (replacing any previous key), this simply prints the token without changing your local config.
My intent is to use it like https://github.com/settings/tokens and other similar setups. I want to create a Hex token that's just used for CI deployment. Maybe one token per project.
In that case maybe it should be called gen
or generate
? add
makes it sound like it's added to the system.
Sure, I'm happy with any name. Looking at this again, though, I wonder if this feature shouldn't be on the Hex.pm website and not the tool. However, I'm unlikely to make a PR for that.
We don't have any features on the website that requires you to log in, it's essentially read only. We are unlikely to add any features like that in the near future.
I haven't wanted this feature since that one time, so I'm going to close this.
I'm interested in creating additional Hex keys on my account so I can think about automated release publication (e.g. Travis' deployment functionality). Adding the command to the Rebar plugin seems like a nice way to go, although I ended up refactoring more than I'd intended. I can scale things back if I went too far.
The
add
command adds a new API key to the user's Hex account. The key is displayed to the user, but not stored anywhere.I tried to put the key-adding code into
rebar3_hex_key
and the user-login code intorebar3_hex_user
so now those two call each other a bit.