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

Fails to assume instance role when Instance Metadata V2 is set to require (imdsv2) #289

Open
lox opened this issue Aug 8, 2021 · 5 comments

Comments

@lox
Copy link
Contributor

lox commented Aug 8, 2021

Fails to find credentials when Instance is set to require Instance Metadata V2 tokens.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html

@tbordovsky
Copy link

+1

@ohookins
Copy link

ohookins commented Feb 4, 2022

Also having that problem here.

@kholisrag
Copy link

kholisrag commented Sep 30, 2022

also having this issue for me, any workaround to fix this?

trying using imds v2 but still got result :

$ echo "xxxxxxxxxxxx.dkr.ecr.us-west-2.amazonaws.com" | docker-credential-ecr-login get

credentials not found in native keychain

@adkafka
Copy link

adkafka commented Oct 6, 2022

I had this issue as well, but I noticed that my version of docker-credential-ecr-login was old:

$ docker-credential-ecr-login -v
amazon-ecr-credential-helper
Version:    0.3.1
Git commit: b4a1707

I updated the binary in-place, after installing:

$ sudo curl https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com/0.6.0/linux-amd64/docker-credential-ecr-login -o `which docker-credential-ecr-login`
$ sudo chmod +x `which docker-credential-ecr-login`

And now it is working as expected on a machine that only supports IMDSv2!

@supergibbs
Copy link
Contributor

Recently required IMDSv2 and am now having this issue. I've narrowed it down some:

  • I run gitlab runner on EC2, no problem running locally (shell executor)
  • when I run in a docker executor it fails.
  • job runs on docker:24.0 with v0.7.1 downloaded to path
  • apk installs 0.6.0 which also doesn't work.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants