An error occurred (InvalidSignatureException) when calling the GetAuthorizationToken operation: Signature not yet current: is still later than
This error happened on trying to push the Docker image to AWS ECR repository. The reason behind this error is the incorrect time in the machine from where its trying to push the image.
So first of all we need to ensure that the date and time configured is correct.
Any issues in date or time can be corrected using the following command.
#date -d "date-time-string"
Where date-time-string need to be replaced with the correct date and time.
If the date and time are correct we need to restart the Docker service.
#systemctl restart docker.
Now it will be able to push the Docker images without any issues.
Also please note that its recommended to sync the date and time using NTP service so that we can avoid these kinds of problems.