-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ECR deployment auth issues from Docker #5163
Comments
Are credentials being passed to the aws-cli docker container? The CLI docs share a good way to do this via volume mounts ( |
I've tried running with root access but always ran into TTY errors:
So I then removed the
Why wouldn't the |
This method of using the AWS CLI runs it in a container. Because it is run in a container, by default the CLI can't access the host file system, which includes configuration and credentials. Running
Bitbucket pipelines doesn't support mounting arbitrary volumes. One alternative is to pass environment variables through to the container:
|
So based off the docs, I should be able to run this command
so long as I swap |
Yes. For the most part, the CLI binary can be replaced with the containerized CLI so long as credentials and configuration are correctly passed through to the container via either volume mounts ( Since Bitbucket Pipelines doesn't support volume mounts, you'll need to use environment variables to pass the credentials and configuration to the container. Assuming that the environment variables
|
After running the above, I got this error:
|
Remove the dollar signs from the docker run command. See
|
Oh those are repository variables set and encrypted in Bitbucket: https://confluence.atlassian.com/bitbucket/variables-in-pipelines-794502608.html Maybe this is more of a limitation from Bitbucket pipelines rather than an aws-cli issue (I'm not entirely sure). There's also this thread and this too but no luck with any of these solutions. Here's the source code for the pipe: https://bitbucket.org/atlassian/aws-ecr-push-image/src/master/ |
Unable to reproduce the issue https://bitbucket.org/rpnguyen/aws-cli-5163/addon/pipelines/home#!/results/1 It's most likely a bug in the pipeline script or the CLI configuration. I recommend that this issue be closed unless new debug logs turn up which indicate a CLI issue. |
there could be one issue that env variables you have defined in your GitLab/Github are for protect branch only and you are running your yaml file on non protect branch. |
None of the solutions from #2875 are working for me, so far I've tried various iterations of the
aws ecr get-login-password
command in a Docker image.For ex:
Results in:
Vast majority of the time I'm encountering this error:
no basic auth credentials
but I'm only facing this error once I'm at the last step trying to push the image:bitbucket-pipelines.yml
file:I've even included
aws configure
in the process above but still theno basic auth credentials
error remains:Version:
The text was updated successfully, but these errors were encountered: