3

I always have been using mix behind proxy at least just 2 weeks ago. However I found that mix becomes not to be able to work behind proxy yesterday. mix version is 1.1.1. mix local.hex runs. But mix deps.get occurs errors.

$ mix deps.get
Registry update failed (http_error)
{:failed_connect, [{:to_address, {'s3.amazonaws.com', 443}}, {:inet, [:inet], :nxdomain}]}
Running dependency resolution
Dependency resolution completed successfully
  combine: v0.5.3
  floki: v0.6.1
  hackney: v1.3.2
  httpoison: v0.7.4
  idna: v1.0.2
  mochiweb: v2.12.2
  ssl_verify_hostname: v1.0.5
  timex: v0.19.5
  tzdata: v0.5.4
* Getting httpoison (Hex package)
Checking package (https://s3.amazonaws.com/s3.hex.pm/tarballs/httpoison-0.7.4.tar)
Request failed: {:failed_connect, [{:to_address, {'s3.amazonaws.com', 443}}, {:inet, [:inet], :nxdomain}]}
** (Mix) Package fetch failed and no cached copy available

The proxies are set by HTTP_PROXY and HTTPS_PROXY. I also set .gitconfig as;

[http]
  proxy = http://proxy.mycompany.co.jp:10080
[https]
  proxy = http://proxy.mycompany.co.jp:10080
[url "https://"]
  insteadOf = git://

Is it the problem about proxy itself and are there some workaround about this?

HirofumiTamori
  • 1,125
  • 2
  • 13
  • 27

1 Answers1

4

This was a regression in the last version of Hex, it should be fixed in the next release (this weekend probably). You can work around it by cloning https://github.com/hexpm/hex and running mix install to install the development version. mix local.hex will revert back to stable.

  • Thanks! I tried the dev version and successfully got the tar ball! – HirofumiTamori Nov 25 '15 at 00:46
  • Sorry for any inconvenience and thanks for verifying that the development version works, will have a new stable release out latest by this weekend. – Eric Meadows-Jönsson Nov 25 '15 at 04:20
  • 1
    For anyone still having issues (when proxy uses NTLM authentication) follow the steps on [this answer](https://stackoverflow.com/questions/18569054/npm-behind-ntlm-proxy/18570201#18570201) by installing CNTLM. It worked for me. – fitims Mar 04 '16 at 10:16