---
title: "Comment by Lucas on \"Push your Docker containers from GitLab to Amazon ECR\" | Hashnode"
description: "Hi I try with this yml and I&#39;m getting this error: $ aws ecr get-login-password | docker login --username AWS --password-stdin $DOCKER_REGISTRY Unable to lo"
url: "https://hashnode.com/posts/push-your-docker-containers-from-gitlab-to-amazon-ecr/5ffc7523aa5c467fe155b129/comment/6077935f4155da32fc83b4bd"
---

[Discussion](https://hashnode.com/posts/push-your-docker-containers-from-gitlab-to-amazon-ecr/5ffc7523aa5c467fe155b129)

Comment [Push your Docker containers from GitLab to Amazon ECR](https://hashnode.com/posts/push-your-docker-containers-from-gitlab-to-amazon-ecr/5ffc7523aa5c467fe155b129)

[Lucas](https://hashnode.com/@lucas-ordonez)

[Apr 15, 2021](https://hashnode.com/posts/push-your-docker-containers-from-gitlab-to-amazon-ecr/5ffc7523aa5c467fe155b129/comment/6077935f4155da32fc83b4bd)

Hi I try with this yml and I'm getting this error:

$ aws ecr get-login-password | docker login --username AWS --password-stdin $DOCKER\_REGISTRY Unable to locate credentials. You can configure credentials by running "aws configure". Error: Cannot perform an interactive login from a non TTY device

I already setup the aws key and secret variables in ci/cd settings on gitlab.

Someone know how to resolve it?

I'm using on premise server with a gitlab runner docker with executor docker.

Thanks.

[DINA](https://hashnode.com/@cisel)

[Apr 27, 2021](https://hashnode.com/posts/push-your-docker-containers-from-gitlab-to-amazon-ecr/5ffc7523aa5c467fe155b129/comment/6077935f4155da32fc83b4bd#reply-6087c6b4b81aa72681392895)

Hi Lucas, Thank's for your comment. Did you try to run an aws configure and a login from a terminal to be sure that your access are ok ?

Can you check that your variables are configured in the right gitlab project ? If it's the case, can you try to rename your variable in gitlab with an other name ? For example, rename AWS\_ACCESS\_KEY\_ID to AMAZON\_ACCESS\_KEY\_ID and try again to see if there is a difference in your error message.

Hope it helps ! Best regards

[ub1k](https://hashnode.com/@ub1k)

[May 18, 2021](https://hashnode.com/posts/push-your-docker-containers-from-gitlab-to-amazon-ecr/5ffc7523aa5c467fe155b129/comment/6077935f4155da32fc83b4bd#reply-60a3d2e9b7d0a531c6aa71d7)

for me it was that the AWS\_ACCESS\_KEY\_ID were created as "protected". if you're not running the pipeline from protected branch (which I suppose you don't) then these vars are not exposed. just disable the "protected" checkbox

[DINA](https://hashnode.com/@cisel)

[May 19, 2021](https://hashnode.com/posts/push-your-docker-containers-from-gitlab-to-amazon-ecr/5ffc7523aa5c467fe155b129/comment/6077935f4155da32fc83b4bd#reply-60a4c86959b7dc409c3d2d98)

[ub1k](https://hashnode.com/@ub1k) Thank's for sharing !
