Closed ostinelli closed 5 years ago
Have you first tried upgrading the rebar3 hex plugin? Latest rebar3 changes version of the package index, and so the plugin needs updating as well.
I've deleted the ~/.cache/rebar3
directory and rerun rebar3
, should I take other steps?
Just to be on the safe side:
$ rebar3 plugins upgrade rebar3_hex
===> Fetching rebar3_hex ({pkg,<<"rebar3_hex">>,<<"6.0.0">>})
===> Version cached at /Users/roberto/.cache/rebar3/hex/hexpm/packages/rebar3_hex-6.0.0.tar is up to date, reusing it
===> Fetching hex_core ({pkg,<<"hex_core">>,<<"0.2.0">>})
===> Version cached at /Users/roberto/.cache/rebar3/hex/hexpm/packages/hex_core-0.2.0.tar is up to date, reusing it
===> Compiling hex_core
===> Compiling rebar3_hex
$ rebar3 hex publish
===> Verifying dependencies...
escript: exception error: no function clause matching
rebar3_hex_publish:format_error(no_write_key) (/Users/roberto/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_publish.erl, line 55)
in function rebar3:handle_error/2 (/opt/rebar3-3.7.5/src/rebar3.erl, line 339)
in call from escript:run/2 (escript.erl, line 760)
in call from escript:start/1 (escript.erl, line 277)
in call from init:start_em/1
in call from init:do_boot/3
@ostinelli thanks, I definitely need to fix the format error handling. But looks like you simply need to authenticate again rebar3 hex auth
.
Thank you for looking into this. A little better... :)
$ rebar3 hex user auth
Username: ([])>
Account Password:
You have authenticated on Hex using your account password. However, Hex requires you to have a local password that applies only to this machine for security purposes. Please enter it.
Local Password:
Local Password (confirm):
Generating all keys...
$ rebar3 hex publish
===> Verifying dependencies...
===> Using deprecated rebar_utils:vcs_vsn/3. Please upgrade your plugins.
Publishing rebar3_vendor 0.4.0 to hexpm
Description: Rebar3 plugin for vendoring dependencies.
Dependencies:
Included files:
/Users/roberto/workspace/rebar3_vendor/LICENSE.md
/Users/roberto/workspace/rebar3_vendor/README.md
/Users/roberto/workspace/rebar3_vendor/rebar.config
/Users/roberto/workspace/rebar3_vendor/rebar.lock
/Users/roberto/workspace/rebar3_vendor/src/rebar3_prv_vendor_apply.erl
/Users/roberto/workspace/rebar3_vendor/src/rebar3_prv_vendor_store.erl
/Users/roberto/workspace/rebar3_vendor/src/rebar3_vendor.erl
Maintainers:
Roberto Ostinelli
Licenses: MIT
Links:
Github: http://github.com/ostinelli/rebar3_vendor
Build tools: rebar3
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: {case_clause,
{ok,{400,
#{<<"alt-svc">> => <<"clear">>,
<<"cache-control">> =>
<<"max-age=0, private, must-revalidate">>,
<<"content-length">> => <<"50">>,
<<"content-type">> =>
<<"application/vnd.hex+erlang; charset=utf-8">>,
<<"date">> =>
<<"Thu, 29 Nov 2018 16:44:12 GMT">>,
<<"server">> => <<"Cowboy">>,
<<"strict-transport-security">> =>
<<"max-age=31536000">>,
<<"vary">> => <<"accept-encoding">>,
<<"via">> => <<"1.1 google">>,
<<"x-ratelimit-limit">> => <<"500">>,
<<"x-ratelimit-remaining">> =>
<<"499">>,
<<"x-ratelimit-reset">> =>
<<"1543509900">>,
<<"x-request-id">> =>
<<"2llqc25edk22mquvc401220h">>},
#{<<"message">> => <<"Bad request">>,
<<"status">> => 400}}}}
What can I try?
I'm checking with Eric to see if he can tell on the server end what was bad about the request.
Nothing found in the logs he says.
One option is to give me temporary permission to publish rebar3_vendor
and I can try to debug.
Other option is to try moving back to 5.0.0 rebar3_hex.
Oops, haha, forgot I published this originally :).
I'll give it a try and debug whats going on.
@ostinelli so I accidentally published 0.4.0 with rebar3_hex 4.1.0 :)
But I was able to reproduce the 400 after that, so I can investigate and the new vendor plugin is published.
@ostinelli I published rebar3_hex 6.1.0 and it worked for me to publish rebar3_vendor, so should be good now.
lol I forgot that too. :) Thank you @tsloughter!
When trying to publish my rebar3_vendor plugin, I'm getting the following error:
Using Erlang 19.3 and latest
rebar3
. Any ideas on what I might be doing wrong?