Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Amazon ECR Plugin login issue "Authorization Token has expired"

I've followed the instructions on the Amazon ECR Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Amazon+ECR, which simply instructs a user to install the Amazon ECR configure the Docker Build & Deploy plugin), but Jenkins is unable to authenticate with ECR.

The error message produced is:

denied: Your Authorization Token has expired. Please run 'aws ecr get-login' to fetch a new one.

Any advice anyone can provide is greatly appreciated.

like image 261
R. Glenn Avatar asked May 09 '17 17:05

R. Glenn


1 Answers

I always use this command as the first step in my Jenkins jobs for login to ECR:

aws ecr get-login --no-include-email --profile ecr | bash

where "--profile ecr" is predefined profile in Jenkins (.asw/config, .aws/credentials)

like image 62
anton.uspehov Avatar answered Oct 20 '22 09:10

anton.uspehov