diff --git a/Makefile b/Makefile
index 69ce32c8fcfad2e917f64c7c40a57d1d5da54130..a79a8b667d7dafad78cc43625437232a70c3d71b 100644
--- a/Makefile
+++ b/Makefile
@@ -3,10 +3,10 @@
 lint: dep ## Lint the files
 	@golint -set_exit_status ./...
 
-test: ## Run unittests
+test: dep ## Run unittests
 	@go test -cover -coverprofile=coverage.txt -covermode count ./...
 
-dep: ## Get the dependencies
+dep: login ## Get the dependencies
 	@go get -a -v ./...
 	@go get google.golang.org/grpc/internal/transport@v1.37.0
 	@go get google.golang.org/grpc@v1.37.0
@@ -26,7 +26,7 @@ macos:
 	$(eval export GOOS := darwin)
 	@go build -o builds/main ./cmd/query-service/
 
-linux: # Build for linux
+linux: login # Build for linux
 	$(eval export GOOS := linux)
 	CGO_ENABLED=0 go build -o builds/main ./cmd/query-service/
 
@@ -34,7 +34,6 @@ run:
 	./builds/main
 
 develop-sivan:
-
 	$(eval export RABBIT_USER := haha-test)
 	$(eval export RABBIT_PASSWORD := dikkedraak)
 	$(eval export RABBIT_HOST := 192.168.178.158)
@@ -48,7 +47,6 @@ develop-sivan:
 
 	
 develop:
-
 	$(eval export RABBIT_USER := guest)
 	$(eval export RABBIT_PASSWORD := guest)
 	$(eval export RABBIT_HOST := localhost)
@@ -62,14 +60,17 @@ develop:
 
 	@go run cmd/query-service/main.go
 
-docker:
+docker: login
 	make linux
 	@docker build -t query-service:latest .
 	@docker tag query-service:latest datastropheregistry.azurecr.io/query-service:latest
 	@docker push datastropheregistry.azurecr.io/query-service\:latest
 
-staging:
+staging: login
 	make linux
 	@docker build -t query-service-staging:latest .
 	@docker tag query-service-staging:latest datastropheregistry.azurecr.io/query-service-staging:latest
-	@docker push datastropheregistry.azurecr.io/query-service-staging:latest
\ No newline at end of file
+	@docker push datastropheregistry.azurecr.io/query-service-staging:latest
+
+login:
+	echo -e "machine git.science.uu.nl\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc
\ No newline at end of file