Problem installing dependencies - could not install Hex because Mix could not download metadata

Hi, I have problem with mix deps.get.
When I use it, I receive communicate like below:

Failed to fetch record for 'phoenix_pubsub' from registry (using cache)
:socket_closed_remotely
Failed to fetch record for 'phoenix_live_reload' from registry (using cache)
:socket_closed_remotely
Failed to fetch record for 'postgrex' from registry (using cache)
:socket_closed_remotely
Failed to fetch record for 'cowboy' from registry (using cache)
:socket_closed_remotely 
Failed to fetch record for 'phoenix_html' from registry (using cache)
:socket_closed_remotely
Failed to fetch record for 'phoenix' from registry (using cache)
:socket_closed_remotely
** (Mix) No package with name phoenix (from: mix.exs) in registry

If I try mix local.hex, I have:

** (Mix) httpc request failed with: :socket_closed_remotely

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

Output from mix hex.info is:

Hex:    0.14.0
Elixir: 1.6.0
OTP:    20.1

Built with: Elixir 1.3.4 and OTP 18.3.4.4

Where can be a problem?

1 Like

Are you perhaps firewalls or proxied to the internet?

1 Like

Thanks, I just realized that it was related to proxy.

1 Like

can you please document what you did to solve this for the benefit of other users in the same position who don’t know how to solve this just by knowing that they are behind a proxy.

I am on windows 10
Erlang/OTP 22 [erts-10.5] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Elixir 1.9.4 (compiled with Erlang/OTP 20)

I’m having the same problem.