Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching ECR authorization token to use to login with the docker CLI #464

Open
JLOrdaz opened this issue Sep 4, 2024 · 7 comments
Open
Labels
bug We can reproduce the issue and confirmed it is a bug.

Comments

@JLOrdaz
Copy link

JLOrdaz commented Sep 4, 2024

Describe the bug
I try to publish container to ECR and get error with this message:

Fetching ECR authorization token to use to login with the docker CLI

aws-cli/2.17.42 Python/3.11.9 Windows/10 exe/AMD64

Client:
Version: 27.2.0
API version: 1.47
Go version: go1.21.13
Git commit: 3ab4256
Built: Tue Aug 27 14:17:17 2024
OS/Arch: windows/amd64
Context: desktop-linux

Server: Docker Desktop 4.34.0 (165256)
Engine:
Version: 27.2.0
API version: 1.47 (minimum version 1.24)
Go version: go1.21.13
Git commit: 3ab5c7d
Built: Tue Aug 27 14:15:15 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.20
GitCommit: 8fc6bcff51318944179630522a095cc9dbf9f353
runc:
Version: 1.1.13
GitCommit: v1.1.13-0-g58aa920
docker-init:
Version: 0.19.0
GitCommit: de40ad0

I have project web i need update to ECR to use Fargate.
To Reproduce

Steps to reproduce the behavior
example:

  1. Go to publish to container.
  2. and the moment to push, try to connect and get the error.

GTAApi could not be published as Container Image to Amazon Elastic Container Registry (ECR): Failed to push Docker Image due to the following reason:
denied: Your authorization token has expired. Reauthenticate and try again.

Toolkit Logs

... docker build: #20 writing image sha256:2aeca5f8751bc73d82ac311e99c8a385fbed9a836db2b03ff05bf07c9976fc51 done
... docker build: #20 naming to docker.io/library/gtaapi:latest done
... docker build: #20 DONE 0.0s
... docker build: View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/4n4rz26ew7btdst1t8z3azxch
Fetching ECR authorization token to use to login with the docker CLI
Executing docker CLI login command
... invoking 'docker login'
... docker login: WARNING! Using --password via the CLI is insecure. Use --password-stdin.
... docker login: Login Succeeded
Found existing ECR Repository gtaapi

Development System (please complete the following information):

  • Windows Version: Windows 11
  • Visual Studio Version: Version 17.11.2
  • AWS Toolkit for Visual Studio Version:
    Toolkit Version: 1.57.0.0
    Visual Studio: VS Community 2022
    Visual Studio Version: 17.11.2
    OS: Win32NT
    OS Version: 10.0.22631.0
    OS Architecture: X64

Additional context

@JLOrdaz JLOrdaz added the bug We can reproduce the issue and confirmed it is a bug. label Sep 4, 2024
@dmazurek
Copy link

dmazurek commented Sep 5, 2024

I experienced this too after upgrading to 27.2.0 in Ubuntu 20.04 LTS (full version: 5:27.2.0-1~ubuntu.20.04~focal). Downgrading to 5:27.1.2-1~ubuntu.20.04~focal fixed it.

@connorhei
Copy link

I also am experiencing the same issue

@jsgal
Copy link

jsgal commented Oct 4, 2024

Exactly the same here when using docker desktop 4.34

Workaround is to downgrade to docker desktop 4.33. This solved the problem for me.

Previous versions can be found under the release notes section. I had to uninstall & reinstall (containers + images are lost).

Checking the release notes, 4.34 had changes related to login, authentication, and credential store. Appears to be some sort of conflict with the tool kit and 4.34.

@ronmorton
Copy link

ronmorton commented Oct 7, 2024

Same issue for me. After upgrading from 4.33 to 4.34 docker pull gave error repository does not exist or may require 'docker login': denied: Your authorization token has expired. Reauthenticate and try again.

Uninstalling 4.34 and installing 4.33 resolved the issue for now. Unfortunately, you lose all images and have to add again.

@ronmorton
Copy link

The solution for me was to not include the repository name in "docker login". Based on release notes for Docker Desktop 4.34. https://docs.docker.com/desktop/release-notes/. "Known issue" section.
From
docker login --username AWS --password-stdin <aws acct>.dkr.ecr.us-east-1.amazonaws.com/<repository name>

to

docker login --username AWS --password-stdin <aws acct>.dkr.ecr.us-east-1.amazonaws.com

It appears prior to 4.34, this wasn't an issue.

@dfuentes77
Copy link

Seems fixed in latest update 4.35.0 (172550)

@jsgal
Copy link

jsgal commented Nov 1, 2024

Confirmed fixed in 4.35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug.
Projects
None yet
Development

No branches or pull requests

6 participants