2016-10-20 更新:⚠️ UPYUN 官方给了一个镜像,推荐使用这个:https://ruby-china.org/topics/31631
因为 Hex 默认使用 Fastly 作为镜像,国内的网络时不时出现无法访问或者下载极慢的状态
这里提供了一个镜像源( http://hex.linjun.me ),让国内环境下使用 Mix 的体验更友好
永久设置为使用此镜像
- Mix
$ mix hex.config mirror_url https://o70o6u4j7.qnssl.com
- Rebar3 添加
{rebar_packages_cdn, "https://o70o6u4j7.qnssl.com"}
. 到全局的或者项目层级的rebar.config
文件里
临时使用
- Mix
$ HEX_MIRROR=https://o70o6u4j7.qnssl.com mix deps.get
- Rebar3
$ HEX_CDN=https://o70o6u4j7.qnssl.com rebar3 update