diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index dc08dc56b3b1ba018cc81c01e4b32df1aff48a37..a8b75cd0f94c00b1fa45ad5c6961d74c56df7797 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,10 +1,3 @@
-before_script:
-  - git config --global url.https://.insteadOf git://
-  - mkdir -p ~/.hex ~/.config/rebar3 && touch ~/.config/rebar3/rebar.config
-  - if [ "$HTTP_PROXY" != "" ]; then printf "{http_proxy,\"$HTTP_PROXY\"}.\n" >> ~/.config/rebar3/rebar.config; fi
-  - if [ "$HTTPS_PROXY" != "" ]; then printf "{https_proxy,\"$HTTPS_PROXY\"}.\n" >> ~/.config/rebar3/rebar.config; fi
-  - rebar3 update
-
 stages:
   - compile
   - test
@@ -26,11 +19,10 @@ hex_publish:
   only:
     - /^\d+[.]\d+[.]\d+$/ # Only publish HEAD tagged with semantic version
   script:
-    - printf "{key,<<\"$HEX_KEY\">>}.\n{username,<<\"$HEX_USERNAME\">>}.\n" > ~/.hex/hex.config
-    - printf "{plugins, [rebar3_hex]}.\n" > ~/.config/rebar3/rebar.config
+    - mkdir -p ~/.hex && printf "{key,<<\"$HEX_KEY\">>}.\n{username,<<\"$HEX_USERNAME\">>}.\n" > ~/.hex/hex.config
+    - mkdir -p ~/.config/rebar3 && printf "{plugins, [rebar3_hex]}.\n" > ~/.config/rebar3/rebar.config
+    - rebar3 update
     - echo "Y" | rebar3 hex publish
-  tags:
-    - amazon
 
 aws_publish:
   stage: publish
@@ -42,5 +34,3 @@ aws_publish:
     - rebar3 as production do tar
     - aws s3 cp _build/production/rel/tsuru/tsuru-$CI_BUILD_REF_NAME.tar.gz s3://s3.erlang.ninja/tsuru/
     - aws s3 cp s3://s3.erlang.ninja/tsuru/tsuru-$CI_BUILD_REF_NAME.tar.gz s3://s3.erlang.ninja/tsuru/tsuru-latest.tar.gz
-  tags:
-    - amazon