Request failed (404) ** (Mix) Package fetch failed and no cached copy available

Problem

You are trying to use hex for installing dependencies but when you are behind a proxy you get the following message:

Request failed (404)
** (Mix) Package fetch failed and no cached copy available

Solution

You can use the following to set up hex (taken from the answer here:

mix hex.config http_proxy http://proxy.mycompany.com