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

can't get authentication to work #7

Open
masterkain opened this issue Jun 21, 2024 · 0 comments
Open

can't get authentication to work #7

masterkain opened this issue Jun 21, 2024 · 0 comments

Comments

@masterkain
Copy link

masterkain commented Jun 21, 2024

I'm a bit confused here, when I use the latest plugins/ecr on a kubernetes drone pipeline (no multiarch) I have no issues pushing with the same set of credentials.

if I switch to plugins/buildx-ecr I get 403. simplified code follows (.drone.jsonnet):

local DockerRepoSettings(build_args=null) = {
  registry: 'xxxx.dkr.ecr.eu-west-1.amazonaws.com',
  region: 'eu-west-1',
  access_key: {
    from_secret: 'ecr_access_key',
  },
  secret_key: {
    from_secret: 'ecr_secret_key',
  },
  repo: 'databases',
  platform: 'linux/amd64,linux/arm64',
  builder_driver: 'docker-container',
  debug: true,
};
    {
      name: 'push',
      image: 'plugins/buildx-ecr',
      privileged: true,
      settings: DockerRepoSettings(),
    },

build log extract:

#11 [auth] sharing credentials for xxxx.dkr.ecr.eu-west-1.amazonaws.com
#11 DONE 0.0s

#10 exporting to image
#10 pushing layers 1.2s done
#10 pushing manifest for xxxx.dkr.ecr.eu-west-1.amazonaws.com/databases:bstore_xxx_production-schema-1718982433-15@sha256:3c8d7f97a67eb7b4c720c2abf08da4d5e9154ac72fe9865346f3787951e6ed63
#10 pushing manifest for xxxx.dkr.ecr.eu-west-1.amazonaws.com/databases:bstore_xxx_production-schema-1718982433-15@sha256:3c8d7f97a67eb7b4c720c2abf08da4d5e9154ac72fe9865346f3787951e6ed63 0.2s done
#10 ERROR: failed to push xxxx.dkr.ecr.eu-west-1.amazonaws.com/databases:bstore_xxx_production-schema-1718982433-15: failed commit on ref "manifest-sha256:464a06b0890e736105984aa41ab29a45d87252ba87f3ad1a74bf4e273782e029": unexpected status from PUT request to https://xxxx.dkr.ecr.eu-west-1.amazonaws.com/v2/databases/manifests/sha256:464a06b0890e736105984aa41ab29a45d87252ba87f3ad1a74bf4e273782e029: 403 Forbidden
------
 > exporting to image:
------
WARNING: current commit information was not captured by the build: git was not found in the system: exec: "git": executable file not found in $PATH
ERROR: failed to solve: failed to push xxxx.dkr.ecr.eu-west-1.amazonaws.com/databases:bstore_xxx_production-schema-1718982433-15: failed commit on ref "manifest-sha256:464a06b0890e736105984aa41ab29a45d87252ba87f3ad1a74bf4e273782e029": unexpected status from PUT request to https://xxxx.dkr.ecr.eu-west-1.amazonaws.com/v2/databases/manifests/sha256:464a06b0890e736105984aa41ab29a45d87252ba87f3ad1a74bf4e273782e029: 403 Forbidden
exit status 1
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

1 participant