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

The system does not have docker-credential-ecr-login CLI #4176

Open
jimmyzzxhlh opened this issue Jan 28, 2024 · 2 comments
Open

The system does not have docker-credential-ecr-login CLI #4176

jimmyzzxhlh opened this issue Jan 28, 2024 · 2 comments

Comments

@jimmyzzxhlh
Copy link

Environment:

  • Jib version: 3.4.0
  • Build tool: Gradle 8.5.0
  • OS: Mac Ventura 13.5 (22G74)

Description of the issue:
I have the AWS docker-credential-ecr-login installed using Brew, and I can execute the following command to get a secret token.

echo <repository_uri> | docker-credential-ecr-login get

But Jib throws the following error:

Execution failed for task ':jib'.
> com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: The system does not have docker-credential-ecr-login CLI

Steps to reproduce:
Run ./gradlew jib

jib-gradle-plugin Configuration:

jib {
	from {
		image = "openjdk:alpine"
	}
	to {
		image = <repository_uri>
		setCredHelper("ecr-login")
		tags = setOf("latest")
	}
}

@chanseokoh
Copy link
Member

chanseokoh commented Jan 28, 2024

I suspect this:

You configured a credential helper, but the helper is not on $PATH. This is especially common when running Jib inside IDE where the IDE binary is launched directly from an OS menu and does not have access to your shell's environment.

If everything else fails, as a last resort, you can always set the absolute path of your docker-credential-ecr-login:

This parameter can either be configured as an absolute path to the credential helper executable or as a credential helper suffix (following docker-credential-).

@jasonab
Copy link

jasonab commented Apr 4, 2024

I have this same problem on OSX, but it's with desktop and osxkeychain

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

No branches or pull requests

4 participants