elixir-lang / elixir

Elixir is a dynamic, functional language for building scalable and maintainable applications
https://elixir-lang.org/
Apache License 2.0
24.49k stars 3.38k forks source link

Could not install Hex because Mix could not download metadata at https://repo.hex.pm/installs/hex-1.x.csv. #11971

Closed FloatingDorito closed 2 years ago

FloatingDorito commented 2 years ago

Elixir and Erlang/OTP versions

Erlang/OTP 25 [erts-13.0.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]

Elixir 1.13.4 (compiled with Erlang/OTP 23)

Operating system

Windows 11 + WSL Ubuntu 20.04 LTS

Current behavior

When I run mix local.hex or mix local.hex --force The error output I receive is:

** (Mix) httpc request failed with: {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}

Could not install Hex because Mix could not download metadata at https://repo.hex.pm/installs/hex-1.x.csv.

Alternatively, you can compile and install Hex directly with this command:

    mix archive.install github hexpm/hex branch latest

When I run mix deps.get The error output I receive is:

Failed to fetch record for 'hexpm/hackney' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/unicode_util_compat' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/postgrex' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/gettext' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/metrics' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/mimerl' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/ecto' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/mox' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/swoosh' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/jason' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/telemetry_poller' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/phoenix_view' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/sourceror' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/phoenix' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/decimal' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/faker' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/nimble_publisher' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/earmark_parser' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/cowboy' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/makeup_erlang' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/mime' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
Failed to fetch record for 'hexpm/ssl_verify_fun' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}
** (Mix) Unknown package ecto in lockfile
Failed to fetch record for 'hexpm/elixir_feed_parser' from registry (using cache instead)
{:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}

I've tried building hex myself:

git clone https://github.com/hexpm/hex.git
cd hex
git checkout v0.20.5
mix install

I've also tried the suggested command mix archive.install github hexpm/hex branch latest

Neither resolve the issue.

I noticed this related to issue #9987 however none of the suggested solutions worked for me.

Do you know anything I should try? Any help and support would be appreciated. Thank you!

Expected behavior

Hex should install successfully mix deps.get should install project dependencies

josevalim commented 2 years ago

Hi @FloatingDorito! Are you running behind a proxy or similar? Can you do curl https://repo.hex.pm/installs/hex-1.x.csv or similar from the same shell? Can you access the address from your browser? Thank you.

FloatingDorito commented 2 years ago

Hi @FloatingDorito! Are you running behind a proxy or similar? Can you do curl https://repo.hex.pm/installs/hex-1.x.csv or similar from the same shell? Can you access the address from your browser? Thank you.

The output is

0.14.0,b8a849be7e731f8d844229c029107e281364b55fe257d0f6d6ea9f7224d8c414d2ec2f0dee4bcdd9bc7672cab6c9d19e7e6bbb0539c740678fb6047821ce363d,1.0.0
... (and more)

I follow the link through my visual studio code terminal in my browser, and it just let me download a csv file.

I don't think I am running in a proxy, I didn't recall, do you know how to check if I am running behind a proxy or similar?

josevalim commented 2 years ago

I don't think you are in a proxy them. That's usually the case in corporate environments, and then you usually know you are behind one. :)

Can you please try this in IEx?

iex> :inets.start
iex> :ssl.start
iex> :httpc.request 'https://google.com'
FloatingDorito commented 2 years ago

This is what happens after the line iex> :ssl.start the same output goes for iex> :httpc.request 'https://google.com':

iex(1)> ** (CompileError) iex:1: undefined function iex/0 (there is no such import)
josevalim commented 2 years ago

Sorry, please try this:


:inets.start
:ssl.start
:httpc.request 'https://google.com'
FloatingDorito commented 2 years ago

Output after :inets.start in terminal: :inets.start: command not found Instead I've done this:

iex> :ssl.start
:ssl.start
:httpc.request 'https://google.com'

The output after :ssl.start:

iex(1)> :ok

The output after :httpc.request 'https://google.com':

    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (stdlib 4.0.1) gen_server.erl:382: :gen_server.call/3
    httpc.erl:566: :httpc.handle_request/9

Is there any command I need to type before :inets.start ?

josevalim commented 2 years ago

Sorry, you need to type the inets one inside IEx too. Start IEx and please try the three commands.

FloatingDorito commented 2 years ago

Sorry, you need to type the inets one inside IEx too. Start IEx and please try the three commands

Opps, my bad I've realized I've done the wrong command: Instead I've done this:

iex> :inets.start
:ssl.start
:httpc.request 'https://google.com'

The output after :ssl.start:

iex(1)> :ok

The output after :httpc.request 'https://google.com':

    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (stdlib 4.0.1) gen_server.erl:382: :gen_server.call/3
    httpc.erl:566: :httpc.handle_request/9

Then with adding inets inets :ssl.start same goes to inets :httpc.request 'https://google.com':

iex(2)> ** (CompileError) iex:2: undefined function inets/1 (there is no such import)
josevalim commented 2 years ago

It seems you are still typing the expressions incorrectly. Can you please type the lines from the previous snippet, one by one, line by line?

FloatingDorito commented 2 years ago

Sorry, please try this:

:inets.start
:ssl.start
:httpc.request 'https://google.com'

is it this one?

josevalim commented 2 years ago

Yes, each line one by one. :)

FloatingDorito commented 2 years ago

iex(1) is :inets.start iex(2) is :ssl.start iex(3) is :httpc.request 'https://google.com'

This is the output:

iex(1)> :ok
iex(2)> :ok
iex(3)> 
00:51:41.248 [warning] Description: 'Authenticity is not established by certificate path validation'
     Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing'

00:51:41.485 [warning] Description: 'Authenticity is not established by certificate path validation'
     Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing'

{:ok,
 {{'HTTP/1.1', 200, 'OK'},
  [
    {'cache-control', 'private, max-age=0'},
    {'date', 'Sun, 10 Jul 2022 16:51:42 GMT'},
    {'accept-ranges', 'none'},
    {'server', 'gws'},
    {'vary', 'Accept-Encoding'},
    {'content-length', '53256'},
    {'content-type', 'text/html; charset=ISO-8859-1'},
    {'expires', '-1'},
    {'p3p', 'CP="This is not a P3P policy! See g.co/p3phelp for more info."'},
    {'x-xss-protection', '0'},
    {'x-frame-options', 'SAMEORIGIN'},
    {'set-cookie',
     '1P_JAR=2022-07-10-16; expires=Tue, 09-Aug-2022 16:51:42 GMT; path=/; domain=.google.com; Secure'},
    {'set-cookie',
     'AEC=AakniGMAnrCCApQd6o_IyJmAxsBkrzT65jgQKPMaQ6NtluKSRwrxxfBzB9E; expires=Fri, 06-Jan-2023 16:51:42 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax'},
    {'set-cookie',
     'NID=511=gsLFdjj1OcvlwNftmyfKSJVbzH3Gzvc-Scv6halUMg-Qg_UWopKDhbCKO2cc8K-A1jkLUdnfoP7jZLA9wnQzlZp-vbMjg3sTonEPj5cge2nuCoSWm9L0hwdAJTpkHOLzb60wFwdX3IlGCuVWq2lVOkfHZDx8CSjecxFIq-wedl4; expires=Mon, 09-Jan-2023 16:51:42 GMT; path=/; domain=.google.com; HttpOnly'},
    {'alt-svc',
     'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"'}
  ],
  '<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en-MY"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><title>Google</title><script nonce="NEAZNcuY1atodw11DchOeg">(function(){window.google={kEI:\'ngPLYoy2LOmL4-EPhJKz-A4\',kEXPI:\'0,1302536,56873,1709,4349,207,4804,2316,383,246,5,1354,4013,1123753,1197736,380755,16114,28684,17572,4858,1362,9290,3025,17584,4020,978,13228,3847,10622,22741,2372,4302,1279,2742,149,1103,840,1983,4314,108,4012,2023,1777,520,14670,3227,2845,7,17450,7539,8781,4465,13142,3,576,1014,1,5444,149,11323,2652,4,1528,2304,7039,25073,2658,7357,11443,2215,4437,16786,5809,2548,4094,17,4035,3,3541,1,39047,2,3105,2,14022,2715,8071,3330,11623,5679,1020,2381,2719,18260,2,6,1,7753,4569,6252,23424,1252,5835,14968,4332,15,6074,1395,445,2,2,1,26632,8155,2566,4015,99,701,2,2446,595,858,10779,7341,1399,13056,7,1922,541,5165,3466,607,23,5416,1103,346,1278,1663,2,5893,1495,421,4139,156,2488,4491,1549,332,4398,181,780,4842,527,585,158,419,27,299,1729,113,4042,283,2146,310,1536,122,418,282,4,1,2,2,2,2,3718,1620,61,73,480,872,23,82,922,19,339,17,1211,147,96,744,95,422,1735,182,922,922,1903,660,293,107,595,2,716,7,807,40,10,4,759,118,3,932,552,3,10,249,2125,5391381,107,148,8799644,3452,795,2,19733,1,1,346,355,11,3,5,2,9,41,4,2,215,1,43,2,2,2,1,2,2,4,3,7,1,2,3,2,1,23949760,4042142,1964,2935,159,1358,963,11258,2556,443,406,717,5308,1362144\',kBL:\'G5RJ\'};google.sn=\'webhp\';google.kHL=\'en-MY\';})();(function(){\nvar f=this||self;var h,k=[];function l(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||h}function m(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b}\nfunction n(a,b,c,d,g){var e="";c||-1!==b.search("&ei=")||(e="&ei="+l(d),-1===b.search("&lei=")&&(d=m(d))&&(e+="&lei="+d));d="";!c&&f._cshid&&-1===b.search("&cshid=")&&"slh"!==a&&(d="&cshid="+f._cshid);c=c||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+e+"&zx="+Date.now()+d;/^http:/i.test(c)&&"https:"===window.location.protocol&&(google.ml&&google.ml(Error("a"),!1,{src:c,glmm:1}),c="");return c};h=google.kEI;google.getEI=l;google.getLEI=m;google.ml=function(){return null};google.log=function(a,b,c,d,g){if(c=n(a,b,c,d,g)){a=new Image;var e=k.length;k[e]=a;a.onerror=a.onload=a.onabort=function(){delete k[e]};a.src=c}};google.logUrl=n;}).call(this);(function(){\ngoogle.y={};google.sy=[];google.x=function(a,b){if(a)var c=a.id;else{do c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.sx=function(a){google.sy.push(a)};google.lm=[];google.plm=function(a){google.lm.push.apply(google.lm,a)};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};google.bx=!1;google.lx=function(){};}).call(this);google.f={};(function(){\ndocument.documentElement.addEventListener("submit",function(b){var a;if(a=b.target){var c=a.getAttribute("data-submitfalse");a="1"===c||"q"===c&&!a.elements.q.value?!0:!1}else a=!1;a&&(b.preventDefault(),b.stopPropagation())},!0);document.documentElement.addEventListener("click",function(b){var a;a:{for(a=b.target;a&&a!==document.documentElement;a=a.parentElement)if("A"===a.tagName){a="1"===a.getAttribute("data-nohref");break a}a=!1}a&&b.preventDefault()},!0);}).call(this);</script><style>#gb{font:13px/27px Arial,sans-serif;height:30px}#gbz,#gbg{position:absolute;white-space:nowrap;top:0;height:30px;z-index:1000}#gbz{left:0;padding-left:4px}#gbg{right:0;padding-right:5px}#gbs{background:transparent;position:absolute;top:-999px;visibility:hidden;z-index:998;right:0}.gbto #gbs{background:#fff}#gbx3,#gbx4{background-color:#2d2d2d;background-image:none;_background-image:none;background-position:0 -138px;background-repeat:repeat-x;border-bottom:1px solid #000;font-size:24px;height:29px;_height:30px;opacity:1;filter:alpha(opacity=100);position:absolute;top:0;width:100%;z-index:990}#gbx3{left:0}#gbx4{right:0}#gbb{position:relative}#gbbw{left:0;position:absolute;top:30px;wi' ++ ...}}
iex(4)> 
josevalim commented 2 years ago

Thank you! What about:


:inets.start
:ssl.start
:httpc.request 'https://repo.hex.pm/'
FloatingDorito commented 2 years ago
Interactive Elixir (1.13.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :ok
iex(2)> :ok
iex(3)> 
02:08:03.702 [warning] Description: 'Authenticity is not established by certificate path validation'
     Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing'

{:error,
 {:failed_connect,
  [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]}}
josevalim commented 2 years ago

Ok, so the issue is not with the http client, but whatever you are using as DNS provider is not being capable of resolving to hex.pm. Do you use VPNs or anything that could be interfering with the DNS lookups?

If you are on WSL, you can try installing dig and typing this on WSL (not IEx):

$ sudo apt-get install dnsutils
$ dig repo.hex.pm
FloatingDorito commented 2 years ago

This is the output after $ sudo apt-get install dnsutils:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'bind9-dnsutils' instead of 'dnsutils'
bind9-dnsutils is already the newest version (1:9.16.1-0ubuntu2).
bind9-dnsutils set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

This is the output after $ dig repo.hex.pm:

; <<>> DiG 9.16.1-Ubuntu <<>> repo.hex.pm
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21526
;; flags: qr rd ad; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;repo.hex.pm.                   IN      A

;; ANSWER SECTION:
dualstack.f2.shared.global.fastly.net. 0 IN A   151.101.2.2
dualstack.f2.shared.global.fastly.net. 0 IN A   151.101.66.2
dualstack.f2.shared.global.fastly.net. 0 IN A   151.101.130.2
dualstack.f2.shared.global.fastly.net. 0 IN A   151.101.194.2
repo.hex.pm.            0       IN      CNAME   dualstack.f2.shared.global.fastly.net.
FloatingDorito commented 2 years ago

I realized I'm using an application called WARP, is it the reason it is affecting?

josevalim commented 2 years ago

Maybe. You can try turning it off and see if it affects the results. But dig is working as expected...

Can you please try this in IEx as well:

iex> :inet_res.gethostbyname 'repo.hex.pm'
iex> :inet_gethost_native.gethostbyname 'repo.hex.pm'

It should be two commands. Each will give a different output.

FloatingDorito commented 2 years ago

I did in :inet_res.gethostbyname 'repo.hex.pm' and :inet_res.gethostbyname 'repo.hex.pm'

iex(1)> {:ok,
 {:hostent, 'dualstack.f2.shared.global.fastly.net', ['repo.hex.pm'], :inet, 4,
  [{199, 232, 46, 2}]}}
iex(2)> {:ok,
 {:hostent, 'dualstack.f2.shared.global.fastly.net', ['repo.hex.pm'], :inet, 4,
  [{199, 232, 46, 2}]}}
josevalim commented 2 years ago

Can you please check your message? You said you ran the same command twice. Which one is which?

in any case, if both worked, then installing Hex should work, can you please try again?

josevalim commented 2 years ago

Ping. :)

ray-sh commented 2 years ago

Hi Jose, Not sure whether this is useful. When I stuck at mix local.rebar, curl xxx.csv could help resolve this. Looks like 60000ms is not enough in some poor network.

Shall I install rebar3? (if running non-interactively, use "mix local.rebar --force") [Yn] y ** (Mix) request timed out after 60000ms

Could not install Rebar because Mix could not download metadata at https://repo.hex.pm/installs/rebar-1.x.csv.

ray@mac-a02 hello_phx % curl https://repo.hex.pm/installs/rebar-1.x.csv 2.6.2,ff1c5ddfce1fcfd73fd65b8bfc0ff1c13aefc2e98921d528cbc1f35e86c9caa1c9c4e848b9ce6404d9a81c50cfcf0e45dd0dddb23cd42708664c41fce6618900,1.0.0 2.6.2,ff1c5ddfce1fcfd73fd65b8bfc0ff1c13aefc2e98921d528cbc1f35e86c9caa1c9c4e848b9ce6404d9a81c50cfcf0e45dd0dddb23cd42708664c41fce6618900,1.0.0 ray@mac-a02 hello_phx % mix deps.compile
Could not find "rebar3", which is needed to build dependency :telemetry I can install a local copy which is just used by Mix Shall I install rebar3? (if running non-interactively, use "mix local.rebar --force") [Yn] y ** (Mix) request timed out after 60000ms

Could not install Rebar because Mix could not download metadata at https://repo.hex.pm/installs/rebar-1.x.csv.signed.

ray@mac-a02 hello_phx % curl https://repo.hex.pm/installs/rebar-1.x.csv.signed qc0Jirc+cvQTzArHDejmNxqsxFKx74uBMrS/0VBkMAnR30bgHM571ChHHRBHDqAn XiqVWjULStbyUd75AkOncca0XCMCsY5DQrC2qnfwebtNVAXVvbMpr2pK832qGpxS Vgi5ibZ/DApuLsBXa3nkHjnIze3KOKq08CUZcC389JL0k1ky0QU2IjxRXMoxet9O O1G6PEnRmeQLMtF4uiXqA9M0r0TSG5Bi6zAtKo9LOv+ycrBwBMlrPXCJ0x+kEKh7 4pvtDxxF6xJ77X3peVpWAEWnSm5v3HDQsgsfyYKObhEnMllDWlqCKXas+igVAgUw ldZ7uCiBSB36GXE7R/hHvA== ray@mac-a02 hello_phx % mix deps.compile
Could not find "rebar3", which is needed to build dependency :telemetry I can install a local copy which is just used by Mix Shall I install rebar3? (if running non-interactively, use "mix local.rebar --force") [Yn] y

josevalim commented 2 years ago

The csv file is relative small though. Do you really think 60s is not enough to download it? 🤔

FloatingDorito commented 2 years ago

Can you please check your message? You said you ran the same command twice. Which one is which?

in any case, if both worked, then installing Hex should work, can you please try again?

Sorry for the late reply, I've been busy the past few weeks and managed to take my time Thank you for your help, the issue is resolved, and Hex can be installed!

FloatingDorito commented 2 years ago

Should I close the issue myself or you would like to wait to help @ray-sh 's issue before closing?

josevalim commented 2 years ago

Thank you For the updates. It seems the other issue was resolved at the end as well!

bamorim commented 1 year ago

I just started getting this error, but with rebar instead.

at 13:43:42 ❯ mix local.hex --force
* creating /Users/bamorim/.asdf/installs/elixir/1.14.3-otp-25/.mix/archives/hex-2.0.6

at 13:49:44 ❯ mix local.rebar --force
** (Mix) Could not install Rebar because Mix could not verify authenticity of metadata file at "https://repo.hex.pm/installs/rebar3-1.x.csv". This may happen because a proxy or some entity is interfering with the download or because you don't have a public key to verify the download.

You may try again later or check if a new public key has been released in our public keys page: https://repo.hex.pm/installs/public_keys.html
wojtekmach commented 1 year ago

this is the same as https://github.com/elixir-lang/elixir/issues/12615, looking into it right now.

zvozin commented 5 months ago

Getting the same, Sonoma 14.2.1, Erlang 26, Elixir 1.16.3. Happens strictly within the Elixir runtime - any URLs above are accessible via browser and curl. Is there a workaround? 🙏

simon-nystrom commented 5 months ago

I'm having this issue as well with rebar

mix local.rebar
** (Mix) httpc request failed with: {:failed_connect, [{:to_address, {~c"builds.hex.pm", 443}}, {:inet, [:inet], {:tls_alert, {:unknown_ca, ~c"TLS client: In state wait_cert_cr at ssl_handshake.erl:2111 generated CLIENT ALERT: Fatal - Unknown CA\n"}}}]}

Could not install Rebar because Mix could not download metadata at https://builds.hex.pm/installs/rebar3-1.x.csv.
dantuck commented 4 months ago

Same issue:

❯ mix local.rebar --force
** (Mix) httpc request failed with: {:failed_connect, [{:to_address, {~c"builds.hex.pm", 443}}, {:inet, [:inet], {:tls_alert, {:unknown_ca, ~c"TLS client: In state wait_cert_cr at ssl_handshake.erl:2125 generated CLIENT ALERT: Fatal - Unknown CA\n"}}}]}

Could not install Rebar because Mix could not download metadata at https://builds.hex.pm/installs/rebar3-1.x.csv.
❯ elixir -v
Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit]

Elixir 1.16.3 (compiled with Erlang/OTP 26)