Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSet environment variables for credHelper #2814
Comments
|
This is an interesting use case. As another coarse workaround, you can write two wrapper scripts #!/bin/sh
AWS_PROFILE=profile-foo
exec docker-credential-ecr-login $* # "exec" is not really required; I just do it to replace the sh process.Then having |
|
@chanseokoh Thanks for the idea - I ended up being able to push the base image into the same ecr registry as the output image. So problem solved for me, but by working around it. But I think this is a valid, if not that common, use case, so I would like to leave this as a feature request. |


I want to use the "ecr-login" credHelper for both
fromandto, but I need to use different environment variables (AWS_PROFILEin my case), because the IAM is different in each case. If it is possible somehow, I would like to know, and if not, I would like to request this feature (just like e.g.environmentcan be set fordockerClient).As a workaround, I will now try to run the credHelper manually and pass in username/password values via system properties (
-Djib.to.auth.username=...)