Failed to get registry credentials (Registry: ‘#userPassedEcr_%id%’ could not be found or invalid credentials)


While using AWS ECR as your container registry when using a push step in pipeline it’s failing with “Failed to get registry credentials” error


Incorrect push step syntax.

Use example below as a reference:

  title: Pushing image to ECR
  region: '${{AWS_REGION}}'
  accessKeyId: '${{AWS_ACCESS_KEY_ID}}'
  secretAccessKey: '${{AWS_SECRET_ACCESS_KEY}}'
  type: push
  stage: push
  provider: ecr
  image_name: '${{IMAGE_NAME}}'
  candidate: '${{build_step_name}}'
  tag: '${{CF_BRANCH}}'


This example assumes you’re using provider name as set in Integrations, not the registry logical name.